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

Unified Diff: chrome/browser/unload_uitest.cc

Issue 8376001: UI test for browser termination with beforeunload handler. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Revert app terminating notification test Created 9 years, 2 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/unload_uitest.cc
===================================================================
--- chrome/browser/unload_uitest.cc (revision 106520)
+++ chrome/browser/unload_uitest.cc (working copy)
@@ -315,6 +315,15 @@
EXPECT_EQ(0, exit_code); // Expect a clean shutdown.
}
+// Tests terminating the browser with a beforeunload handler.
+TEST_F(UnloadTest, BrowserTerminateBeforeUnload) {
+ scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(browser.get());
+ NavigateToDataURL(BEFORE_UNLOAD_HTML, L"beforeunload");
+ TerminateBrowser();
+ VerifyCleanExit();
+}
+
#if defined(OS_LINUX)
// Fails sometimes on Linux valgrind. http://crbug.com/45675
#define MAYBE_BrowserCloseWithInnerFocusedFrame \

Powered by Google App Engine
This is Rietveld 408576698