summaryrefslogtreecommitdiffstats
path: root/chrome/browser/unload_uitest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 02:46:56 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 02:46:56 +0000
commit665a493066c31c2ab6ea757598ca3fffdc9765eb (patch)
treec0561104cb461d6d49988ba063ca79d801caa18e /chrome/browser/unload_uitest.cc
parent3d8643615d42366d041e96c9cd38c396b99e1f0a (diff)
downloadchromium_src-665a493066c31c2ab6ea757598ca3fffdc9765eb.zip
chromium_src-665a493066c31c2ab6ea757598ca3fffdc9765eb.tar.gz
chromium_src-665a493066c31c2ab6ea757598ca3fffdc9765eb.tar.bz2
Don't run unload tests that hang the renderer in single-process mode, since now the browser thread waits for the renderer thread on shutdown.
Review URL: http://codereview.chromium.org/39245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/unload_uitest.cc')
-rw-r--r--chrome/browser/unload_uitest.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc
index 74990d3..d166c93 100644
--- a/chrome/browser/unload_uitest.cc
+++ b/chrome/browser/unload_uitest.cc
@@ -253,23 +253,39 @@ TEST_F(UnloadTest, BrowserCloseTwoSecondBeforeUnload) {
// Tests closing the browser on a page with an unload listener registered where
// the unload handler has an infinite loop.
TEST_F(UnloadTest, BrowserCloseInfiniteUnload) {
+ // Tests makes no sense in single-process mode since the renderer is hung.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
+ return;
+
LoadUrlAndQuitBrowser(INFINITE_UNLOAD_HTML, L"infiniteunload");
}
// Tests closing the browser with a beforeunload handler that hangs.
TEST_F(UnloadTest, BrowserCloseInfiniteBeforeUnload) {
+ // Tests makes no sense in single-process mode since the renderer is hung.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
+ return;
+
LoadUrlAndQuitBrowser(INFINITE_BEFORE_UNLOAD_HTML, L"infinitebeforeunload");
}
// Tests closing the browser on a page with an unload listener registered where
// the unload handler has an infinite loop followed by an alert.
TEST_F(UnloadTest, BrowserCloseInfiniteUnloadAlert) {
+ // Tests makes no sense in single-process mode since the renderer is hung.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
+ return;
+
LoadUrlAndQuitBrowser(INFINITE_UNLOAD_ALERT_HTML, L"infiniteunloadalert");
}
// Tests closing the browser with a beforeunload handler that hangs then
// pops up an alert.
TEST_F(UnloadTest, BrowserCloseInfiniteBeforeUnloadAlert) {
+ // Tests makes no sense in single-process mode since the renderer is hung.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess))
+ return;
+
LoadUrlAndQuitBrowser(INFINITE_BEFORE_UNLOAD_ALERT_HTML,
L"infinitebeforeunloadalert");
}