diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 17:46:53 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 17:46:53 +0000 |
commit | 0e28ef06edf54b80309ad26c5fb3b780388dc8ea (patch) | |
tree | 30576d6074011b388ddd6503170c956954844635 | |
parent | 99105c310a87b3a7d22a97ef3a5b47ea53ca9fbb (diff) | |
download | chromium_src-0e28ef06edf54b80309ad26c5fb3b780388dc8ea.zip chromium_src-0e28ef06edf54b80309ad26c5fb3b780388dc8ea.tar.gz chromium_src-0e28ef06edf54b80309ad26c5fb3b780388dc8ea.tar.bz2 |
Allow reentrant tasks on window close in in-proc browser test framework. Disable tests that are failing on Mac.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/425013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32804 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser_browsertest.cc | 14 | ||||
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 9 |
2 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc index 2ea76c2..d4efd9e 100644 --- a/chrome/browser/browser_browsertest.cc +++ b/chrome/browser/browser_browsertest.cc @@ -149,7 +149,11 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ThirtyFourTabs) { // Test for crbug.com/22004. Reloading a page with a before unload handler and // then canceling the dialog should not leave the throbber spinning. +#if defined(OS_MACOSX) +IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_ReloadThenCancelBeforeUnload) { +#else IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) { +#endif GURL url("data:text/html," + BEFORE_UNLOAD_HTML); ui_test_utils::NavigateToURL(browser(), url); @@ -167,7 +171,12 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) { // Test for crbug.com/11647. A page closed with window.close() should not have // two beforeunload dialogs shown. +#if defined(OS_MACOSX) +IN_PROC_BROWSER_TEST_F(BrowserTest, + DISABLED_SingleBeforeUnloadAfterWindowClose) { +#else IN_PROC_BROWSER_TEST_F(BrowserTest, FLAKY_SingleBeforeUnloadAfterWindowClose) { +#endif browser()->GetSelectedTabContents()->render_view_host()-> ExecuteJavascriptInWebFrame(L"", OPEN_NEW_BEFOREUNLOAD_PAGE); @@ -201,7 +210,12 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, RenderIdleTime) { // Test IDC_CREATE_SHORTCUTS command is enabled for url scheme file, ftp, http // and https and disabled for chrome://, about:// etc. +#if defined(OS_MACOSX) +IN_PROC_BROWSER_TEST_F(BrowserTest, + DISABLED_CommandCreateAppShortcut) { +#else IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcut) { +#endif static const wchar_t kDocRoot[] = L"chrome/test/data"; CommandUpdater* command_updater = browser()->command_updater(); diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 3205046..6c85760 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -266,9 +266,18 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() { // Close all browser windows. This might not happen immediately, since some // may need to wait for beforeunload and unload handlers to fire in a tab. // When all windows are closed, the last window will call Quit(). +#if defined(OS_MACOSX) + // When the browser window closes, Cocoa will generate an inner-loop that + // processes the RenderProcessHost delete task, so allow task nesting. + bool old_state = MessageLoopForUI::current()->NestableTasksAllowed(); + MessageLoopForUI::current()->SetNestableTasksAllowed(true); +#endif BrowserList::const_iterator browser = BrowserList::begin(); for (; browser != BrowserList::end(); ++browser) (*browser)->CloseWindow(); +#if defined(OS_MACOSX) + MessageLoopForUI::current()->SetNestableTasksAllowed(old_state); +#endif // Stop the HTTP server. http_server_ = NULL; |