| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome_frame/test/net/fake_external_tab.h" | 5 #include "chrome_frame/test/net/fake_external_tab.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <exdisp.h> | 9 #include <exdisp.h> |
| 10 #include <Winsock2.h> | 10 #include <Winsock2.h> |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 // Load Chrome.dll as our resource dll. | 452 // Load Chrome.dll as our resource dll. |
| 453 FilePath dll; | 453 FilePath dll; |
| 454 PathService::Get(base::DIR_MODULE, &dll); | 454 PathService::Get(base::DIR_MODULE, &dll); |
| 455 dll = dll.Append(chrome::kBrowserResourcesDll); | 455 dll = dll.Append(chrome::kBrowserResourcesDll); |
| 456 HMODULE res_mod = ::LoadLibraryExW(dll.value().c_str(), | 456 HMODULE res_mod = ::LoadLibraryExW(dll.value().c_str(), |
| 457 NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE); | 457 NULL, LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE); |
| 458 DCHECK(res_mod); | 458 DCHECK(res_mod); |
| 459 _AtlBaseModule.SetResourceInstance(res_mod); | 459 _AtlBaseModule.SetResourceInstance(res_mod); |
| 460 | 460 |
| 461 ResourceBundle::InitSharedInstanceWithLocale("en-US"); | 461 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
| 462 | 462 |
| 463 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 463 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
| 464 cmd->AppendSwitch(switches::kDisableWebResources); | 464 cmd->AppendSwitch(switches::kDisableWebResources); |
| 465 cmd->AppendSwitch(switches::kSingleProcess); | 465 cmd->AppendSwitch(switches::kSingleProcess); |
| 466 | 466 |
| 467 browser_process_.reset(new FakeBrowserProcessImpl(*cmd)); | 467 browser_process_.reset(new FakeBrowserProcessImpl(*cmd)); |
| 468 // BrowserProcessImpl's constructor should set g_browser_process. | 468 // BrowserProcessImpl's constructor should set g_browser_process. |
| 469 DCHECK(g_browser_process); | 469 DCHECK(g_browser_process); |
| 470 g_browser_process->SetApplicationLocale("en-US"); | 470 g_browser_process->SetApplicationLocale("en-US"); |
| 471 | 471 |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 // content::InitializeSandboxInfo(&sandbox_info); | 891 // content::InitializeSandboxInfo(&sandbox_info); |
| 892 FakeMainDelegate delegate; | 892 FakeMainDelegate delegate; |
| 893 content::ContentMain( | 893 content::ContentMain( |
| 894 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), | 894 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), |
| 895 &sandbox_info, | 895 &sandbox_info, |
| 896 &delegate); | 896 &delegate); |
| 897 | 897 |
| 898 // Note: In debug builds, we ExitProcess during PostDestroyThreads. | 898 // Note: In debug builds, we ExitProcess during PostDestroyThreads. |
| 899 return g_test_suite->test_result(); | 899 return g_test_suite->test_result(); |
| 900 } | 900 } |
| OLD | NEW |