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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 base::win::ScopedCOMInitializer com; | 521 base::win::ScopedCOMInitializer com; |
522 chrome_frame_test::CloseAllIEWindows(); | 522 chrome_frame_test::CloseAllIEWindows(); |
523 | 523 |
524 // Tweak IE settings to make it amenable to testing before launching it. | 524 // Tweak IE settings to make it amenable to testing before launching it. |
525 ie_configurator_.reset(chrome_frame_test::CreateConfigurator()); | 525 ie_configurator_.reset(chrome_frame_test::CreateConfigurator()); |
526 if (ie_configurator_.get() != NULL) { | 526 if (ie_configurator_.get() != NULL) { |
527 ie_configurator_->Initialize(); | 527 ie_configurator_->Initialize(); |
528 ie_configurator_->ApplySettings(); | 528 ie_configurator_->ApplySettings(); |
529 } | 529 } |
530 | 530 |
531 test_http_server_.reset(new test_server::SimpleWebServer(kTestServerPort)); | 531 test_http_server_.reset(new test_server::SimpleWebServer("127.0.0.1", |
| 532 kTestServerPort)); |
532 test_http_server_->AddResponse(&chrome_frame_html_); | 533 test_http_server_->AddResponse(&chrome_frame_html_); |
533 std::wstring url(base::StringPrintf(L"http://localhost:%i/chrome_frame", | 534 std::wstring url(base::StringPrintf(L"http://localhost:%i/chrome_frame", |
534 kTestServerPort).c_str()); | 535 kTestServerPort)); |
535 | 536 |
536 // Launch IE. This launches IE correctly on Vista too. | 537 // Launch IE. This launches IE correctly on Vista too. |
537 base::win::ScopedHandle ie_process(chrome_frame_test::LaunchIE(url)); | 538 base::win::ScopedHandle ie_process(chrome_frame_test::LaunchIE(url)); |
538 EXPECT_TRUE(ie_process.IsValid()); | 539 EXPECT_TRUE(ie_process.IsValid()); |
539 | 540 |
540 // NOTE: If you're running IE8 and CF is not being loaded, you need to | 541 // NOTE: If you're running IE8 and CF is not being loaded, you need to |
541 // disable IE8's prebinding until CF properly handles that situation. | 542 // disable IE8's prebinding until CF properly handles that situation. |
542 // | 543 // |
543 // HKCU\Software\Microsoft\Internet Explorer\Main | 544 // HKCU\Software\Microsoft\Internet Explorer\Main |
544 // Value name: EnablePreBinding (REG_DWORD) | 545 // Value name: EnablePreBinding (REG_DWORD) |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 // content::InitializeSandboxInfo(&sandbox_info); | 905 // content::InitializeSandboxInfo(&sandbox_info); |
905 FakeMainDelegate delegate; | 906 FakeMainDelegate delegate; |
906 content::ContentMain( | 907 content::ContentMain( |
907 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), | 908 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), |
908 &sandbox_info, | 909 &sandbox_info, |
909 &delegate); | 910 &delegate); |
910 | 911 |
911 // Note: In debug builds, we ExitProcess during PostDestroyThreads. | 912 // Note: In debug builds, we ExitProcess during PostDestroyThreads. |
912 return g_test_suite->test_result(); | 913 return g_test_suite->test_result(); |
913 } | 914 } |
OLD | NEW |