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 1aa4f77b363a6f7d9e2badd6f0214f19c4e39ca6..40df17291b9a939aed9adf135b33851aea40cfde 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -3666,7 +3666,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) {
