diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 01:02:00 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 01:02:00 +0000 |
commit | 8d990d54368990f0cc12ffabde1fc19fccb2c4c4 (patch) | |
tree | 0e3965cb5d67b31d8441f7416ac140234940e8d3 | |
parent | 0ecff4259f65f5e920eff998e53e503cf0b2f446 (diff) | |
download | chromium_src-8d990d54368990f0cc12ffabde1fc19fccb2c4c4.zip chromium_src-8d990d54368990f0cc12ffabde1fc19fccb2c4c4.tar.gz chromium_src-8d990d54368990f0cc12ffabde1fc19fccb2c4c4.tar.bz2 |
GTTF: Make browser_tests on Windows self-contained.
Previously they were using chrome.dll, which _could_
lead to incremental build induced problems and other issues.
BUG=none
Review URL: http://codereview.chromium.org/8186001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104415 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/base/chrome_test_launcher.cc | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/chrome/test/base/chrome_test_launcher.cc b/chrome/test/base/chrome_test_launcher.cc index 1bf7f21..3209f7d 100644 --- a/chrome/test/base/chrome_test_launcher.cc +++ b/chrome/test/base/chrome_test_launcher.cc @@ -18,14 +18,8 @@ #endif // defined(OS_MACOSX) #if defined(OS_WIN) -#include "base/base_switches.h" -#include "content/common/sandbox_policy.h" -#include "sandbox/src/dep.h" -#include "sandbox/src/sandbox_factory.h" +#include "content/app/startup_helper_win.h" #include "sandbox/src/sandbox_types.h" - -// The entry point signature of chrome.dll. -typedef int (*DLL_MAIN)(HINSTANCE, sandbox::SandboxInterfaceInfo*, wchar_t*); #endif // defined(OS_WIN) class ChromeTestLauncherDelegate : public test_launcher::TestLauncherDelegate { @@ -46,22 +40,12 @@ class ChromeTestLauncherDelegate : public test_launcher::TestLauncherDelegate { #if defined(OS_WIN) CommandLine* command_line = CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kProcessType)) { - // TODO(phajdan.jr): Make this not use chrome.dll. - // This is a child process, call ChromeMain. - FilePath chrome_path(command_line->GetProgram().DirName()); - chrome_path = chrome_path.Append(chrome::kBrowserResourcesDll); - HMODULE dll = LoadLibrary(chrome_path.value().c_str()); - DLL_MAIN entry_point = - reinterpret_cast<DLL_MAIN>(::GetProcAddress(dll, "ChromeMain")); - if (!entry_point) - return false; - - // Initialize the sandbox services. sandbox::SandboxInterfaceInfo sandbox_info = {0}; - sandbox_info.target_services = - sandbox::SandboxFactory::GetTargetServices(); - *return_code = - entry_point(GetModuleHandle(NULL), &sandbox_info, GetCommandLineW()); + content::InitializeSandboxInfo(&sandbox_info); + ChromeMainDelegate chrome_main_delegate; + *return_code = content::ContentMain(GetModuleHandle(NULL), + &sandbox_info, + &chrome_main_delegate); return true; } #elif defined(OS_LINUX) |