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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 if (chrome_frame_test::GetInstalledIEVersion() == IE_9) { | 545 if (chrome_frame_test::GetInstalledIEVersion() == IE_9) { |
546 // Adding this here as the command line and the logging stuff gets | 546 // Adding this here as the command line and the logging stuff gets |
547 // initialized in the NetTestSuite constructor. Did not want to break that. | 547 // initialized in the NetTestSuite constructor. Did not want to break that. |
548 base::AtExitManager at_exit_manager; | 548 base::AtExitManager at_exit_manager; |
549 CommandLine::Init(argc, argv); | 549 CommandLine::Init(argc, argv); |
550 CFUrlRequestUnittestRunner::InitializeLogging(); | 550 CFUrlRequestUnittestRunner::InitializeLogging(); |
551 LOG(INFO) << "Not running ChromeFrame net tests on IE9"; | 551 LOG(INFO) << "Not running ChromeFrame net tests on IE9"; |
552 return 0; | 552 return 0; |
553 } | 553 } |
554 | 554 |
555 base::ProcessHandle crash_service = chrome_frame_test::StartCrashService(); | |
556 | |
557 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( | 555 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( |
558 InitializeCrashReporting(HEADLESS)); | 556 InitializeCrashReporting(HEADLESS)); |
559 | 557 |
560 // TODO(tommi): Stuff be broke. Needs a fixin'. | 558 // TODO(tommi): Stuff be broke. Needs a fixin'. |
561 // This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains | 559 // This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains |
562 // the instance of the AtExitManager that RegisterPathProvider() and others | 560 // the instance of the AtExitManager that RegisterPathProvider() and others |
563 // below require. So we have to instantiate this first. | 561 // below require. So we have to instantiate this first. |
564 CFUrlRequestUnittestRunner test_suite(argc, argv); | 562 CFUrlRequestUnittestRunner test_suite(argc, argv); |
565 | 563 |
| 564 base::ProcessHandle crash_service = chrome_frame_test::StartCrashService(); |
| 565 |
566 WindowWatchdog watchdog; | 566 WindowWatchdog watchdog; |
567 // See url_request_unittest.cc for these credentials. | 567 // See url_request_unittest.cc for these credentials. |
568 SupplyProxyCredentials credentials("user", "secret"); | 568 SupplyProxyCredentials credentials("user", "secret"); |
569 watchdog.AddObserver(&credentials, "Windows Security", ""); | 569 watchdog.AddObserver(&credentials, "Windows Security", ""); |
570 testing::InitGoogleTest(&argc, argv); | 570 testing::InitGoogleTest(&argc, argv); |
571 FilterDisabledTests(); | 571 FilterDisabledTests(); |
572 test_suite.RunMainUIThread(); | 572 test_suite.RunMainUIThread(); |
573 | 573 |
574 if (crash_service) | 574 if (crash_service) |
575 base::KillProcess(crash_service, 0, false); | 575 base::KillProcess(crash_service, 0, false); |
576 | 576 |
577 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); | 577 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); |
578 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); | 578 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); |
579 return test_suite.test_result(); | 579 return test_suite.test_result(); |
580 } | 580 } |
OLD | NEW |