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

Unified Diff: content/browser/browser_side_navigation_browsertest.cc

Issue 2783723002: Keep track in the browser of which frames have onunload and onbeforeunload handlers. (Closed)
Patch Set: fix content_browsertests with plznavigate and also remove now unnecessary unloadcontroller change Created 3 years, 9 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: content/browser/browser_side_navigation_browsertest.cc
diff --git a/content/browser/browser_side_navigation_browsertest.cc b/content/browser/browser_side_navigation_browsertest.cc
index 6cb86968c0d78ae0d6fc1be433ef473cc6b16041..05e0195f342be47e406ad838d45f63ca447a41a8 100644
--- a/content/browser/browser_side_navigation_browsertest.cc
+++ b/content/browser/browser_side_navigation_browsertest.cc
@@ -282,6 +282,10 @@ IN_PROC_BROWSER_TEST_F(BrowserSideNavigationBrowserTest,
content::WindowedNotificationObserver close_observer(
content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::Source<content::WebContents>(shell()->web_contents()));
+ GURL url(
+ "data:text/html,<html><script>window.onbeforeunload=function(e)"
nasko 2017/03/29 23:31:26 Why not create a simple html file in content/test/
jam 2017/03/30 14:53:22 Done.
+ "{}</script></html>");
+ NavigateToURL(shell(), url);
shell()->LoadURL(GURL("chrome://resources/css/tabs.css"));
shell()->web_contents()->DispatchBeforeUnload();
close_observer.Wait();

Powered by Google App Engine
This is Rietveld 408576698