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 f55c90df9969ace76a0813d02237edcb406e079c..6b341a5c046685afdfc2502191f1f209567c2c6e 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -4156,7 +4156,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) {
