From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aleksei Kuzmin <alkuzmin@microsoft.com>
Date: Thu, 20 Sep 2018 17:47:33 -0700
Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch

See https://github.com/electron/electron/issues/10754

diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index fe9922d72462cd72ef9abb1d82f7033b47e7d3c7..58f3f7c6a3c60c73184597495a9f36c8b3659c68 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -4238,7 +4238,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
         "frame that never had a user gesture since its load. "
         "https://www.chromestatus.com/feature/5082396709879808";
     Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);
-    return true;
+    // TODO(alexeykuzmin): Uncomment `return true` when Electron tests are fixed.
+    // See https://github.com/electron/electron/issues/10754
+    // return true;
   }
 
   if (did_allow_navigation) {
