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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 case IE_UNSUPPORTED: | 580 case IE_UNSUPPORTED: |
581 return "Unknown IE Version"; | 581 return "Unknown IE Version"; |
582 case NON_IE: | 582 case NON_IE: |
583 return "Could not find IE"; | 583 return "Could not find IE"; |
584 default: | 584 default: |
585 return "Error."; | 585 return "Error."; |
586 } | 586 } |
587 } | 587 } |
588 | 588 |
589 int main(int argc, char** argv) { | 589 int main(int argc, char** argv) { |
| 590 if (chrome_frame_test::GetInstalledIEVersion() >= IE_9) { |
| 591 // Adding this here as the command line and the logging stuff gets |
| 592 // initialized in the NetTestSuite constructor. Did not want to break that. |
| 593 base::AtExitManager at_exit_manager; |
| 594 CommandLine::Init(argc, argv); |
| 595 CFUrlRequestUnittestRunner::InitializeLogging(); |
| 596 LOG(INFO) << "Not running ChromeFrame net tests on IE9+"; |
| 597 return 0; |
| 598 } |
| 599 |
590 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( | 600 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( |
591 InitializeCrashReporting(HEADLESS)); | 601 InitializeCrashReporting(HEADLESS)); |
592 | 602 |
593 // TODO(tommi): Stuff be broke. Needs a fixin'. | 603 // TODO(tommi): Stuff be broke. Needs a fixin'. |
594 // This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains | 604 // This is awkward: the TestSuite derived CFUrlRequestUnittestRunner contains |
595 // the instance of the AtExitManager that RegisterPathProvider() and others | 605 // the instance of the AtExitManager that RegisterPathProvider() and others |
596 // below require. So we have to instantiate this first. | 606 // below require. So we have to instantiate this first. |
597 CFUrlRequestUnittestRunner test_suite(argc, argv); | 607 CFUrlRequestUnittestRunner test_suite(argc, argv); |
598 | 608 |
599 // Display the IE version we run with. This must be done after | 609 // Display the IE version we run with. This must be done after |
(...skipping 18 matching lines...) Expand all Loading... |
618 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); | 628 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); |
619 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); | 629 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); |
620 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which | 630 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which |
621 // check if globals are created and destroyed on the same thread don't fire. | 631 // check if globals are created and destroyed on the same thread don't fire. |
622 // Webkit global objects are created on the inproc renderer thread. | 632 // Webkit global objects are created on the inproc renderer thread. |
623 #if !defined(NDEBUG) | 633 #if !defined(NDEBUG) |
624 ExitProcess(test_suite.test_result()); | 634 ExitProcess(test_suite.test_result()); |
625 #endif // NDEBUG | 635 #endif // NDEBUG |
626 return test_suite.test_result(); | 636 return test_suite.test_result(); |
627 } | 637 } |
OLD | NEW |