| 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 |
| 11 #include "app/app_paths.h" | 11 #include "app/app_paths.h" |
| 12 #include "app/win/scoped_com_initializer.h" | 12 #include "app/win/scoped_com_initializer.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/debug/debugger.h" | 14 #include "base/debug/debugger.h" |
| 15 #include "base/file_util.h" | 15 #include "base/file_util.h" |
| 16 #include "base/file_version_info.h" | 16 #include "base/file_version_info.h" |
| 17 #include "base/i18n/icu_util.h" | 17 #include "base/i18n/icu_util.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| 20 #include "base/string_util.h" | 20 #include "base/string_util.h" |
| 21 #include "base/stringprintf.h" | 21 #include "base/stringprintf.h" |
| 22 #include "base/system_monitor/system_monitor.h" | |
| 23 #include "base/test/test_timeouts.h" | 22 #include "base/test/test_timeouts.h" |
| 24 #include "base/threading/platform_thread.h" | 23 #include "base/threading/platform_thread.h" |
| 25 #include "base/win/scoped_comptr.h" | 24 #include "base/win/scoped_comptr.h" |
| 26 #include "base/win/scoped_handle.h" | 25 #include "base/win/scoped_handle.h" |
| 27 #include "chrome/browser/automation/automation_provider_list.h" | 26 #include "chrome/browser/automation/automation_provider_list.h" |
| 28 #include "chrome/browser/chrome_content_browser_client.h" | 27 #include "chrome/browser/chrome_content_browser_client.h" |
| 29 #include "chrome/browser/prefs/browser_prefs.h" | 28 #include "chrome/browser/prefs/browser_prefs.h" |
| 30 #include "chrome/browser/prefs/pref_service.h" | 29 #include "chrome/browser/prefs/pref_service.h" |
| 31 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 30 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| 32 #include "chrome/browser/process_singleton.h" | 31 #include "chrome/browser/process_singleton.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 } | 201 } |
| 203 | 202 |
| 204 FakeExternalTab::~FakeExternalTab() { | 203 FakeExternalTab::~FakeExternalTab() { |
| 205 if (!overridden_user_dir_.empty()) { | 204 if (!overridden_user_dir_.empty()) { |
| 206 PathService::Override(chrome::DIR_USER_DATA, overridden_user_dir_); | 205 PathService::Override(chrome::DIR_USER_DATA, overridden_user_dir_); |
| 207 } | 206 } |
| 208 } | 207 } |
| 209 | 208 |
| 210 void FakeExternalTab::Initialize() { | 209 void FakeExternalTab::Initialize() { |
| 211 DCHECK(g_browser_process == NULL); | 210 DCHECK(g_browser_process == NULL); |
| 212 base::SystemMonitor system_monitor; | 211 ui::SystemMonitor system_monitor; |
| 213 | 212 |
| 214 icu_util::Initialize(); | 213 icu_util::Initialize(); |
| 215 | 214 |
| 216 app::RegisterPathProvider(); | 215 app::RegisterPathProvider(); |
| 217 content::RegisterPathProvider(); | 216 content::RegisterPathProvider(); |
| 218 ui::RegisterPathProvider(); | 217 ui::RegisterPathProvider(); |
| 219 | 218 |
| 220 // Load Chrome.dll as our resource dll. | 219 // Load Chrome.dll as our resource dll. |
| 221 FilePath dll; | 220 FilePath dll; |
| 222 PathService::Get(base::DIR_MODULE, &dll); | 221 PathService::Get(base::DIR_MODULE, &dll); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 534 |
| 536 WindowWatchdog watchdog; | 535 WindowWatchdog watchdog; |
| 537 // See url_request_unittest.cc for these credentials. | 536 // See url_request_unittest.cc for these credentials. |
| 538 SupplyProxyCredentials credentials("user", "secret"); | 537 SupplyProxyCredentials credentials("user", "secret"); |
| 539 watchdog.AddObserver(&credentials, "Windows Security", ""); | 538 watchdog.AddObserver(&credentials, "Windows Security", ""); |
| 540 testing::InitGoogleTest(&argc, argv); | 539 testing::InitGoogleTest(&argc, argv); |
| 541 FilterDisabledTests(); | 540 FilterDisabledTests(); |
| 542 test_suite.RunMainUIThread(); | 541 test_suite.RunMainUIThread(); |
| 543 return test_suite.test_result(); | 542 return test_suite.test_result(); |
| 544 } | 543 } |
| OLD | NEW |