Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 7231016: Move app/win/* files to base/win/, ui/base/win and chrome/common/ directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: brettw review Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/utility/chrome_content_utility_client.cc ('k') | chrome_frame/test/url_request_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
13 #include "base/command_line.h" 12 #include "base/command_line.h"
14 #include "base/debug/debugger.h" 13 #include "base/debug/debugger.h"
15 #include "base/file_util.h" 14 #include "base/file_util.h"
16 #include "base/file_version_info.h" 15 #include "base/file_version_info.h"
17 #include "base/i18n/icu_util.h" 16 #include "base/i18n/icu_util.h"
18 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
19 #include "base/path_service.h" 18 #include "base/path_service.h"
20 #include "base/string_util.h" 19 #include "base/string_util.h"
21 #include "base/stringprintf.h" 20 #include "base/stringprintf.h"
22 #include "base/system_monitor/system_monitor.h" 21 #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"
24 #include "base/win/scoped_com_initializer.h"
25 #include "base/win/scoped_comptr.h" 25 #include "base/win/scoped_comptr.h"
26 #include "base/win/scoped_handle.h" 26 #include "base/win/scoped_handle.h"
27 #include "chrome/browser/automation/automation_provider_list.h" 27 #include "chrome/browser/automation/automation_provider_list.h"
28 #include "chrome/browser/chrome_content_browser_client.h" 28 #include "chrome/browser/chrome_content_browser_client.h"
29 #include "chrome/browser/prefs/browser_prefs.h" 29 #include "chrome/browser/prefs/browser_prefs.h"
30 #include "chrome/browser/prefs/pref_service.h" 30 #include "chrome/browser/prefs/pref_service.h"
31 #include "chrome/browser/prefs/proxy_config_dictionary.h" 31 #include "chrome/browser/prefs/proxy_config_dictionary.h"
32 #include "chrome/browser/process_singleton.h" 32 #include "chrome/browser/process_singleton.h"
33 #include "chrome/browser/profiles/profile_manager.h" 33 #include "chrome/browser/profiles/profile_manager.h"
34 #include "chrome/browser/renderer_host/web_cache_manager.h" 34 #include "chrome/browser/renderer_host/web_cache_manager.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 275
276 CFUrlRequestUnittestRunner::~CFUrlRequestUnittestRunner() { 276 CFUrlRequestUnittestRunner::~CFUrlRequestUnittestRunner() {
277 fake_chrome_.Shutdown(); 277 fake_chrome_.Shutdown();
278 } 278 }
279 279
280 void CFUrlRequestUnittestRunner::StartChromeFrameInHostBrowser() { 280 void CFUrlRequestUnittestRunner::StartChromeFrameInHostBrowser() {
281 if (!ShouldLaunchBrowser()) 281 if (!ShouldLaunchBrowser())
282 return; 282 return;
283 283
284 app::win::ScopedCOMInitializer com; 284 base::win::ScopedCOMInitializer com;
285 chrome_frame_test::CloseAllIEWindows(); 285 chrome_frame_test::CloseAllIEWindows();
286 286
287 test_http_server_.reset(new test_server::SimpleWebServer(kTestServerPort)); 287 test_http_server_.reset(new test_server::SimpleWebServer(kTestServerPort));
288 test_http_server_->AddResponse(&chrome_frame_html_); 288 test_http_server_->AddResponse(&chrome_frame_html_);
289 std::wstring url(base::StringPrintf(L"http://localhost:%i/chrome_frame", 289 std::wstring url(base::StringPrintf(L"http://localhost:%i/chrome_frame",
290 kTestServerPort).c_str()); 290 kTestServerPort).c_str());
291 291
292 // Launch IE. This launches IE correctly on Vista too. 292 // Launch IE. This launches IE correctly on Vista too.
293 base::win::ScopedHandle ie_process(chrome_frame_test::LaunchIE(url)); 293 base::win::ScopedHandle ie_process(chrome_frame_test::LaunchIE(url));
294 EXPECT_TRUE(ie_process.IsValid()); 294 EXPECT_TRUE(ie_process.IsValid());
295 295
296 // NOTE: If you're running IE8 and CF is not being loaded, you need to 296 // NOTE: If you're running IE8 and CF is not being loaded, you need to
297 // disable IE8's prebinding until CF properly handles that situation. 297 // disable IE8's prebinding until CF properly handles that situation.
298 // 298 //
299 // HKCU\Software\Microsoft\Internet Explorer\Main 299 // HKCU\Software\Microsoft\Internet Explorer\Main
300 // Value name: EnablePreBinding (REG_DWORD) 300 // Value name: EnablePreBinding (REG_DWORD)
301 // Value: 0 301 // Value: 0
302 } 302 }
303 303
304 void CFUrlRequestUnittestRunner::ShutDownHostBrowser() { 304 void CFUrlRequestUnittestRunner::ShutDownHostBrowser() {
305 if (ShouldLaunchBrowser()) { 305 if (ShouldLaunchBrowser()) {
306 app::win::ScopedCOMInitializer com; 306 base::win::ScopedCOMInitializer com;
307 chrome_frame_test::CloseAllIEWindows(); 307 chrome_frame_test::CloseAllIEWindows();
308 } 308 }
309 } 309 }
310 310
311 // Override virtual void Initialize to not call icu initialize 311 // Override virtual void Initialize to not call icu initialize
312 void CFUrlRequestUnittestRunner::Initialize() { 312 void CFUrlRequestUnittestRunner::Initialize() {
313 DCHECK(::GetCurrentThreadId() == test_thread_id_); 313 DCHECK(::GetCurrentThreadId() == test_thread_id_);
314 314
315 // Start by replicating some of the steps that would otherwise be 315 // Start by replicating some of the steps that would otherwise be
316 // done by TestSuite::Initialize. We can't call the base class 316 // done by TestSuite::Initialize. We can't call the base class
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 542
543 WindowWatchdog watchdog; 543 WindowWatchdog watchdog;
544 // See url_request_unittest.cc for these credentials. 544 // See url_request_unittest.cc for these credentials.
545 SupplyProxyCredentials credentials("user", "secret"); 545 SupplyProxyCredentials credentials("user", "secret");
546 watchdog.AddObserver(&credentials, "Windows Security", ""); 546 watchdog.AddObserver(&credentials, "Windows Security", "");
547 testing::InitGoogleTest(&argc, argv); 547 testing::InitGoogleTest(&argc, argv);
548 FilterDisabledTests(); 548 FilterDisabledTests();
549 test_suite.RunMainUIThread(); 549 test_suite.RunMainUIThread();
550 return test_suite.test_result(); 550 return test_suite.test_result();
551 } 551 }
OLDNEW
« no previous file with comments | « chrome/utility/chrome_content_utility_client.cc ('k') | chrome_frame/test/url_request_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698