diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-29 03:44:44 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-29 03:44:44 +0000 |
commit | badf5cf5f14c65f6c799ef1fec77cde8351339c2 (patch) | |
tree | 83690887c035e4b457f00404f126f95ad1a90c06 /content/test/content_browser_test.cc | |
parent | 8cc9738eff9c169487e8356947d88640659fc497 (diff) | |
download | chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.zip chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.gz chromium_src-badf5cf5f14c65f6c799ef1fec77cde8351339c2.tar.bz2 |
Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing this.
-got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo
-got rid of the duplicated code to initialize the broker
-since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs.
BUG=98716
Review URL: http://codereview.chromium.org/8414020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/content_browser_test.cc')
-rw-r--r-- | content/test/content_browser_test.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/content/test/content_browser_test.cc b/content/test/content_browser_test.cc index 2f97e0e..b1dddd0 100644 --- a/content/test/content_browser_test.cc +++ b/content/test/content_browser_test.cc @@ -5,12 +5,15 @@ #include "content/test/content_browser_test.h" #include "base/debug/stack_trace.h" -#include "base/mac/scoped_nsautorelease_pool.h" #include "base/message_loop.h" #include "content/shell/shell.h" #include "content/shell/shell_main_delegate.h" #include "content/test/test_content_client.h" +#if defined(OS_MACOSX) +#include "base/mac/scoped_nsautorelease_pool.h" +#endif + ContentBrowserTest::ContentBrowserTest() { } @@ -46,6 +49,7 @@ void ContentBrowserTest::RunTestOnMainThreadLoop() { signal(SIGTERM, DumpStackTraceSignalHandler); #endif // defined(OS_POSIX) +#if defined(OS_MACOSX) // On Mac, without the following autorelease pool, code which is directly // executed (as opposed to executed inside a message loop) would autorelease // objects into a higher-level pool. This pool is not recycled in-sync with @@ -54,14 +58,22 @@ void ContentBrowserTest::RunTestOnMainThreadLoop() { // browser shutdown). To avoid this, the following pool is recycled after each // time code is directly executed. base::mac::ScopedNSAutoreleasePool pool; +#endif // Pump startup related events. MessageLoopForUI::current()->RunAllPending(); + +#if defined(OS_MACOSX) pool.Recycle(); +#endif RunTestOnMainThread(); +#if defined(OS_MACOSX) pool.Recycle(); +#endif MessageLoopForUI::current()->Quit(); +#if defined(OS_MACOSX) pool.Recycle(); +#endif } |