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 5bfe30b8b88073b83c8128b889298bd9af5938f3..70129284e60b20258b2e5d3506f93600a2628fc2 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -3508,7 +3508,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) {
