| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
| 43 #include "chrome/renderer/chrome_content_renderer_client.h" | 43 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 44 #include "chrome_frame/crash_server_init.h" | 44 #include "chrome_frame/crash_server_init.h" |
| 45 #include "chrome_frame/test/chrome_frame_test_utils.h" | 45 #include "chrome_frame/test/chrome_frame_test_utils.h" |
| 46 #include "chrome_frame/test/net/test_automation_resource_message_filter.h" | 46 #include "chrome_frame/test/net/test_automation_resource_message_filter.h" |
| 47 #include "chrome_frame/test/simulate_input.h" | 47 #include "chrome_frame/test/simulate_input.h" |
| 48 #include "chrome_frame/test/win_event_receiver.h" | 48 #include "chrome_frame/test/win_event_receiver.h" |
| 49 #include "chrome_frame/utils.h" | 49 #include "chrome_frame/utils.h" |
| 50 #include "content/browser/plugin_service.h" | 50 #include "content/browser/plugin_service.h" |
| 51 #include "content/browser/renderer_host/render_process_host.h" | |
| 52 #include "content/browser/notification_service_impl.h" | 51 #include "content/browser/notification_service_impl.h" |
| 52 #include "content/public/browser/render_process_host.h" |
| 53 #include "content/public/common/content_client.h" | 53 #include "content/public/common/content_client.h" |
| 54 #include "content/public/common/content_paths.h" | 54 #include "content/public/common/content_paths.h" |
| 55 #include "testing/gtest/include/gtest/gtest.h" | 55 #include "testing/gtest/include/gtest/gtest.h" |
| 56 #include "ui/base/resource/resource_bundle.h" | 56 #include "ui/base/resource/resource_bundle.h" |
| 57 #include "ui/base/ui_base_paths.h" | 57 #include "ui/base/ui_base_paths.h" |
| 58 | 58 |
| 59 using content::BrowserThread; | 59 using content::BrowserThread; |
| 60 | 60 |
| 61 namespace { | 61 namespace { |
| 62 | 62 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 261 |
| 262 CommandLine* cmd = CommandLine::ForCurrentProcess(); | 262 CommandLine* cmd = CommandLine::ForCurrentProcess(); |
| 263 cmd->AppendSwitch(switches::kDisableWebResources); | 263 cmd->AppendSwitch(switches::kDisableWebResources); |
| 264 cmd->AppendSwitch(switches::kSingleProcess); | 264 cmd->AppendSwitch(switches::kSingleProcess); |
| 265 | 265 |
| 266 browser_process_.reset(new FakeBrowserProcessImpl(*cmd)); | 266 browser_process_.reset(new FakeBrowserProcessImpl(*cmd)); |
| 267 // BrowserProcessImpl's constructor should set g_browser_process. | 267 // BrowserProcessImpl's constructor should set g_browser_process. |
| 268 DCHECK(g_browser_process); | 268 DCHECK(g_browser_process); |
| 269 g_browser_process->SetApplicationLocale("en-US"); | 269 g_browser_process->SetApplicationLocale("en-US"); |
| 270 | 270 |
| 271 RenderProcessHost::set_run_renderer_in_process(true); | 271 content::RenderProcessHost::set_run_renderer_in_process(true); |
| 272 | 272 |
| 273 browser_process_->local_state()->RegisterBooleanPref( | 273 browser_process_->local_state()->RegisterBooleanPref( |
| 274 prefs::kMetricsReportingEnabled, false); | 274 prefs::kMetricsReportingEnabled, false); |
| 275 | 275 |
| 276 FilePath profile_path(ProfileManager::GetDefaultProfileDir(user_data())); | 276 FilePath profile_path(ProfileManager::GetDefaultProfileDir(user_data())); |
| 277 | 277 |
| 278 // Initialize the content client which that code uses to talk to Chrome. | 278 // Initialize the content client which that code uses to talk to Chrome. |
| 279 content::SetContentClient(&g_chrome_content_client.Get()); | 279 content::SetContentClient(&g_chrome_content_client.Get()); |
| 280 | 280 |
| 281 // Override the default ContentBrowserClient to let Chrome participate in | 281 // Override the default ContentBrowserClient to let Chrome participate in |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); | 618 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); |
| 619 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); | 619 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); |
| 620 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which | 620 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which |
| 621 // check if globals are created and destroyed on the same thread don't fire. | 621 // check if globals are created and destroyed on the same thread don't fire. |
| 622 // Webkit global objects are created on the inproc renderer thread. | 622 // Webkit global objects are created on the inproc renderer thread. |
| 623 #if !defined(NDEBUG) | 623 #if !defined(NDEBUG) |
| 624 ExitProcess(test_suite.test_result()); | 624 ExitProcess(test_suite.test_result()); |
| 625 #endif // NDEBUG | 625 #endif // NDEBUG |
| 626 return test_suite.test_result(); | 626 return test_suite.test_result(); |
| 627 } | 627 } |
| OLD | NEW |