Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: chrome/browser/devtools/devtools_sanity_browsertest.cc

Issue 2801813005: Only show a beforeunload dialog if a frame has had a user gesture since its load. (Closed)
Patch Set: one last bit Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/devtools/devtools_sanity_browsertest.cc
diff --git a/chrome/browser/devtools/devtools_sanity_browsertest.cc b/chrome/browser/devtools/devtools_sanity_browsertest.cc
index 979c9920040b74aba0567e41ecf6c5da5b91503a..ec988312eaef31f60ee66f0f3119af209824da33 100644
--- a/chrome/browser/devtools/devtools_sanity_browsertest.cc
+++ b/chrome/browser/devtools/devtools_sanity_browsertest.cc
@@ -388,9 +388,7 @@ class DevToolsBeforeUnloadTest: public DevToolsSanityTest {
ASSERT_TRUE(content::ExecuteScript(web_contents->GetRenderViewHost(),
"window.addEventListener('beforeunload',"
"function(event) { event.returnValue = 'Foo'; });"));
- // Disable the hang monitor, otherwise there will be a race between the
- // beforeunload dialog and the beforeunload hang timer.
- web_contents->GetMainFrame()->DisableBeforeUnloadHangMonitorForTesting();
+ content::PrepContentsForBeforeUnloadTest(web_contents);
}
void RunBeforeUnloadSanityTest(bool is_docked,

Powered by Google App Engine
This is Rietveld 408576698