diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 19:50:30 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 19:50:30 +0000 |
commit | e4d7e32b58d72d984eae1c4a2892c3d126f3edaa (patch) | |
tree | 4e9a4dccf31855c813232282813e4b5af94698ec | |
parent | 38c2e9aaf8e7098457ecb84659252e332d0a9e6b (diff) | |
download | chromium_src-e4d7e32b58d72d984eae1c4a2892c3d126f3edaa.zip chromium_src-e4d7e32b58d72d984eae1c4a2892c3d126f3edaa.tar.gz chromium_src-e4d7e32b58d72d984eae1c4a2892c3d126f3edaa.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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=104415
Review URL: http://codereview.chromium.org/8186001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104769 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) |