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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
652 fake_chrome_.reset(); | 652 fake_chrome_.reset(); |
653 | 653 |
654 #ifndef NDEBUG | 654 #ifndef NDEBUG |
655 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which | 655 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which |
656 // check if globals are created and destroyed on the same thread don't fire. | 656 // check if globals are created and destroyed on the same thread don't fire. |
657 // Webkit global objects are created on the inproc renderer thread. | 657 // Webkit global objects are created on the inproc renderer thread. |
658 ExitProcess(test_result()); | 658 ExitProcess(test_result()); |
659 #endif | 659 #endif |
660 } | 660 } |
661 | 661 |
662 // We need a module since some of the accessibility code that gets pulled | |
663 // in here uses ATL. | |
664 class ObligatoryModule: public CAtlExeModuleT<ObligatoryModule> { | |
665 public: | |
666 static HRESULT InitializeCom() { | |
667 return OleInitialize(NULL); | |
668 } | |
669 | |
670 static void UninitializeCom() { | |
671 OleUninitialize(); | |
672 } | |
673 }; | |
674 | |
675 ObligatoryModule g_obligatory_atl_module; | |
676 | |
677 const char* IEVersionToString(IEVersion version) { | 662 const char* IEVersionToString(IEVersion version) { |
678 switch (version) { | 663 switch (version) { |
679 case IE_6: | 664 case IE_6: |
680 return "IE6"; | 665 return "IE6"; |
681 case IE_7: | 666 case IE_7: |
682 return "IE7"; | 667 return "IE7"; |
683 case IE_8: | 668 case IE_8: |
684 return "IE8"; | 669 return "IE8"; |
685 case IE_9: | 670 case IE_9: |
686 return "IE9"; | 671 return "IE9"; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
722 } | 707 } |
723 | 708 |
724 int WorkerMain(const content::MainFunctionParams& parameters) { | 709 int WorkerMain(const content::MainFunctionParams& parameters) { |
725 return PluginMain(parameters); | 710 return PluginMain(parameters); |
726 } | 711 } |
727 | 712 |
728 int main(int argc, char** argv) { | 713 int main(int argc, char** argv) { |
729 g_argc = argc; | 714 g_argc = argc; |
730 g_argv = argv; | 715 g_argv = argv; |
731 | 716 |
732 // Temporarily disabled, http://crbug.com/105435. | 717 // Temporarily disabled, http://crbug.com/105435. |
M-A Ruel
2011/12/13 19:58:20
Remove the comment?
ananta
2011/12/13 20:07:06
Done.
| |
733 if (true || chrome_frame_test::GetInstalledIEVersion() >= IE_9) { | 718 if (chrome_frame_test::GetInstalledIEVersion() >= IE_9) { |
734 // Adding this here as the command line and the logging stuff gets | 719 // Adding this here as the command line and the logging stuff gets |
735 // initialized in the NetTestSuite constructor. Did not want to break that. | 720 // initialized in the NetTestSuite constructor. Did not want to break that. |
736 base::AtExitManager at_exit_manager; | 721 base::AtExitManager at_exit_manager; |
737 CommandLine::Init(argc, argv); | 722 CommandLine::Init(argc, argv); |
738 CFUrlRequestUnittestRunner::InitializeLogging(); | 723 CFUrlRequestUnittestRunner::InitializeLogging(); |
739 LOG(INFO) << "Temporarily not running ChromeFrame net tests."; | 724 LOG(INFO) << "Temporarily not running ChromeFrame net tests."; |
M-A Ruel
2011/12/13 19:58:20
Update?
ananta
2011/12/13 20:07:06
Done.
| |
740 //LOG(INFO) << "Not running ChromeFrame net tests on IE9+"; | 725 //LOG(INFO) << "Not running ChromeFrame net tests on IE9+"; |
741 return 0; | 726 return 0; |
742 } | 727 } |
743 | 728 |
744 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( | 729 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( |
745 InitializeCrashReporting(HEADLESS)); | 730 InitializeCrashReporting(HEADLESS)); |
746 | 731 |
747 // Display the IE version we run with. This must be done after | 732 // Display the IE version we run with. This must be done after |
748 // CFUrlRequestUnittestRunner is constructed since that initializes logging. | 733 // CFUrlRequestUnittestRunner is constructed since that initializes logging. |
749 IEVersion ie_version = chrome_frame_test::GetInstalledIEVersion(); | 734 IEVersion ie_version = chrome_frame_test::GetInstalledIEVersion(); |
(...skipping 10 matching lines...) Expand all Loading... | |
760 // content::InitializeSandboxInfo(&sandbox_info); | 745 // content::InitializeSandboxInfo(&sandbox_info); |
761 FakeMainDelegate delegate; | 746 FakeMainDelegate delegate; |
762 content::ContentMain( | 747 content::ContentMain( |
763 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), | 748 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), |
764 &sandbox_info, | 749 &sandbox_info, |
765 &delegate); | 750 &delegate); |
766 | 751 |
767 // Note: In debug builds, we ExitProcess during PostDestroyThreads. | 752 // Note: In debug builds, we ExitProcess during PostDestroyThreads. |
768 return g_test_suite->test_result(); | 753 return g_test_suite->test_result(); |
769 } | 754 } |
OLD | NEW |