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

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: BrowserTestBeforeUnload only for cros 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
« no previous file with comments | « chrome/browser/ui/tests/browser_uitest.cc ('k') | chrome/test/ui/ui_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/unload_uitest.cc
===================================================================
--- chrome/browser/unload_uitest.cc (revision 106989)
+++ chrome/browser/unload_uitest.cc (working copy)
@@ -315,6 +315,18 @@
EXPECT_EQ(0, exit_code); // Expect a clean shutdown.
}
+// Tests terminating the browser with a beforeunload handler.
+// Currently only ChromeOS shuts down gracefully.
+#if defined(OS_CHROMEOS)
+TEST_F(UnloadTest, BrowserTerminateBeforeUnload) {
+ scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(browser.get());
+ NavigateToDataURL(BEFORE_UNLOAD_HTML, L"beforeunload");
+ TerminateBrowser();
+ VerifyCleanExit();
+}
+#endif
+
#if defined(OS_LINUX)
// Fails sometimes on Linux valgrind. http://crbug.com/45675
#define MAYBE_BrowserCloseWithInnerFocusedFrame \
« no previous file with comments | « chrome/browser/ui/tests/browser_uitest.cc ('k') | chrome/test/ui/ui_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698