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

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

Issue 10391051: Fix flake in chrome_frame_net_tests due to improper use of IE configurator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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_frame/test/ie_configurator.cc ('k') | no next file » | 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) 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 511
512 void CFUrlRequestUnittestRunner::StartChromeFrameInHostBrowser() { 512 void CFUrlRequestUnittestRunner::StartChromeFrameInHostBrowser() {
513 if (!launch_browser_) 513 if (!launch_browser_)
514 return; 514 return;
515 515
516 base::win::ScopedCOMInitializer com; 516 base::win::ScopedCOMInitializer com;
517 chrome_frame_test::CloseAllIEWindows(); 517 chrome_frame_test::CloseAllIEWindows();
518 518
519 // Tweak IE settings to make it amenable to testing before launching it. 519 // Tweak IE settings to make it amenable to testing before launching it.
520 ie_configurator_.reset(chrome_frame_test::CreateConfigurator()); 520 ie_configurator_.reset(chrome_frame_test::CreateConfigurator());
521 if (ie_configurator_.get() != NULL) 521 if (ie_configurator_.get() != NULL) {
522 ie_configurator_->Initialize();
522 ie_configurator_->ApplySettings(); 523 ie_configurator_->ApplySettings();
524 }
523 525
524 test_http_server_.reset(new test_server::SimpleWebServer(kTestServerPort)); 526 test_http_server_.reset(new test_server::SimpleWebServer(kTestServerPort));
525 test_http_server_->AddResponse(&chrome_frame_html_); 527 test_http_server_->AddResponse(&chrome_frame_html_);
526 std::wstring url(base::StringPrintf(L"http://localhost:%i/chrome_frame", 528 std::wstring url(base::StringPrintf(L"http://localhost:%i/chrome_frame",
527 kTestServerPort).c_str()); 529 kTestServerPort).c_str());
528 530
529 // Launch IE. This launches IE correctly on Vista too. 531 // Launch IE. This launches IE correctly on Vista too.
530 base::win::ScopedHandle ie_process(chrome_frame_test::LaunchIE(url)); 532 base::win::ScopedHandle ie_process(chrome_frame_test::LaunchIE(url));
531 EXPECT_TRUE(ie_process.IsValid()); 533 EXPECT_TRUE(ie_process.IsValid());
532 534
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 // content::InitializeSandboxInfo(&sandbox_info); 899 // content::InitializeSandboxInfo(&sandbox_info);
898 FakeMainDelegate delegate; 900 FakeMainDelegate delegate;
899 content::ContentMain( 901 content::ContentMain(
900 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), 902 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)),
901 &sandbox_info, 903 &sandbox_info,
902 &delegate); 904 &delegate);
903 905
904 // Note: In debug builds, we ExitProcess during PostDestroyThreads. 906 // Note: In debug builds, we ExitProcess during PostDestroyThreads.
905 return g_test_suite->test_result(); 907 return g_test_suite->test_result();
906 } 908 }
OLDNEW
« no previous file with comments | « chrome_frame/test/ie_configurator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698