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 /chrome/test | |
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
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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; |