| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredSyncNoAction", | 256 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredSyncNoAction", |
| 257 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredSyncSetAuth", | 257 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredSyncSetAuth", |
| 258 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredSyncCancel", | 258 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredSyncCancel", |
| 259 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredAsyncNoAction", | 259 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredAsyncNoAction", |
| 260 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredAsyncSetAuth", | 260 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredAsyncSetAuth", |
| 261 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredAsyncCancel", | 261 "URLRequestTestHTTP.NetworkDelegateOnAuthRequiredAsyncCancel", |
| 262 | 262 |
| 263 // Flaky on the tryservers, http://crbug.com/103097 | 263 // Flaky on the tryservers, http://crbug.com/103097 |
| 264 "URLRequestTestHTTP.MultipleRedirectTest", | 264 "URLRequestTestHTTP.MultipleRedirectTest", |
| 265 "URLRequestTestHTTP.NetworkDelegateRedirectRequest", | 265 "URLRequestTestHTTP.NetworkDelegateRedirectRequest", |
| 266 | |
| 267 // Newly added tests which fail in CF. | |
| 268 "HTTPSRequestTest.HTTPSPreloadedHSTSTest", | |
| 269 "HTTPSRequestTest.ResumeTest", | |
| 270 "HTTPSRequestTest.SSLSessionCacheShardTest", | |
| 271 }; | 266 }; |
| 272 | 267 |
| 273 const char* ie9_disabled_tests[] = { | 268 const char* ie9_disabled_tests[] = { |
| 274 // These always hang on Joi's box with IE9, http://crbug.com/105435. | 269 // These always hang on Joi's box with IE9, http://crbug.com/105435. |
| 275 // Several other tests, e.g. URLRequestTestHTTP.CancelTest2, 3 and | 270 // Several other tests, e.g. URLRequestTestHTTP.CancelTest2, 3 and |
| 276 // 5, often hang but not always. | 271 // 5, often hang but not always. |
| 277 "URLRequestTestHTTP.NetworkDelegateRedirectRequestPost", | 272 "URLRequestTestHTTP.NetworkDelegateRedirectRequestPost", |
| 278 "URLRequestTestHTTP.GetTest", | 273 "URLRequestTestHTTP.GetTest", |
| 279 "HTTPSRequestTest.HTTPSPreloadedHSTSTest", | 274 "HTTPSRequestTest.HTTPSPreloadedHSTSTest", |
| 280 }; | 275 }; |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 fake_chrome_.reset(); | 652 fake_chrome_.reset(); |
| 658 | 653 |
| 659 #ifndef NDEBUG | 654 #ifndef NDEBUG |
| 660 // 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 |
| 661 // 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. |
| 662 // Webkit global objects are created on the inproc renderer thread. | 657 // Webkit global objects are created on the inproc renderer thread. |
| 663 ExitProcess(test_result()); | 658 ExitProcess(test_result()); |
| 664 #endif | 659 #endif |
| 665 } | 660 } |
| 666 | 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 |
| 667 const char* IEVersionToString(IEVersion version) { | 677 const char* IEVersionToString(IEVersion version) { |
| 668 switch (version) { | 678 switch (version) { |
| 669 case IE_6: | 679 case IE_6: |
| 670 return "IE6"; | 680 return "IE6"; |
| 671 case IE_7: | 681 case IE_7: |
| 672 return "IE7"; | 682 return "IE7"; |
| 673 case IE_8: | 683 case IE_8: |
| 674 return "IE8"; | 684 return "IE8"; |
| 675 case IE_9: | 685 case IE_9: |
| 676 return "IE9"; | 686 return "IE9"; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 } | 722 } |
| 713 | 723 |
| 714 int WorkerMain(const content::MainFunctionParams& parameters) { | 724 int WorkerMain(const content::MainFunctionParams& parameters) { |
| 715 return PluginMain(parameters); | 725 return PluginMain(parameters); |
| 716 } | 726 } |
| 717 | 727 |
| 718 int main(int argc, char** argv) { | 728 int main(int argc, char** argv) { |
| 719 g_argc = argc; | 729 g_argc = argc; |
| 720 g_argv = argv; | 730 g_argv = argv; |
| 721 | 731 |
| 722 if (chrome_frame_test::GetInstalledIEVersion() >= IE_9) { | 732 // Temporarily disabled, http://crbug.com/105435. |
| 733 if (true || chrome_frame_test::GetInstalledIEVersion() >= IE_9) { |
| 723 // Adding this here as the command line and the logging stuff gets | 734 // Adding this here as the command line and the logging stuff gets |
| 724 // initialized in the NetTestSuite constructor. Did not want to break that. | 735 // initialized in the NetTestSuite constructor. Did not want to break that. |
| 725 base::AtExitManager at_exit_manager; | 736 base::AtExitManager at_exit_manager; |
| 726 CommandLine::Init(argc, argv); | 737 CommandLine::Init(argc, argv); |
| 727 CFUrlRequestUnittestRunner::InitializeLogging(); | 738 CFUrlRequestUnittestRunner::InitializeLogging(); |
| 728 LOG(INFO) << "Not running ChromeFrame net tests on IE9+"; | 739 LOG(INFO) << "Temporarily not running ChromeFrame net tests."; |
| 740 //LOG(INFO) << "Not running ChromeFrame net tests on IE9+"; |
| 729 return 0; | 741 return 0; |
| 730 } | 742 } |
| 731 | 743 |
| 732 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( | 744 google_breakpad::scoped_ptr<google_breakpad::ExceptionHandler> breakpad( |
| 733 InitializeCrashReporting(HEADLESS)); | 745 InitializeCrashReporting(HEADLESS)); |
| 734 | 746 |
| 735 // Display the IE version we run with. This must be done after | 747 // Display the IE version we run with. This must be done after |
| 736 // CFUrlRequestUnittestRunner is constructed since that initializes logging. | 748 // CFUrlRequestUnittestRunner is constructed since that initializes logging. |
| 737 IEVersion ie_version = chrome_frame_test::GetInstalledIEVersion(); | 749 IEVersion ie_version = chrome_frame_test::GetInstalledIEVersion(); |
| 738 LOG(INFO) << "Running CF net tests with IE version: " | 750 LOG(INFO) << "Running CF net tests with IE version: " |
| 739 << IEVersionToString(ie_version); | 751 << IEVersionToString(ie_version); |
| 740 | 752 |
| 741 // See url_request_unittest.cc for these credentials. | 753 // See url_request_unittest.cc for these credentials. |
| 742 SupplyProxyCredentials credentials("user", "secret"); | 754 SupplyProxyCredentials credentials("user", "secret"); |
| 743 WindowWatchdog watchdog; | 755 WindowWatchdog watchdog; |
| 744 watchdog.AddObserver(&credentials, "Windows Security", ""); | 756 watchdog.AddObserver(&credentials, "Windows Security", ""); |
| 745 | 757 |
| 746 sandbox::SandboxInterfaceInfo sandbox_info = {0}; | 758 sandbox::SandboxInterfaceInfo sandbox_info = {0}; |
| 747 // This would normally be done, but is probably not needed for these tests. | 759 // This would normally be done, but is probably not needed for these tests. |
| 748 // content::InitializeSandboxInfo(&sandbox_info); | 760 // content::InitializeSandboxInfo(&sandbox_info); |
| 749 FakeMainDelegate delegate; | 761 FakeMainDelegate delegate; |
| 750 content::ContentMain( | 762 content::ContentMain( |
| 751 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), | 763 reinterpret_cast<HINSTANCE>(GetModuleHandle(NULL)), |
| 752 &sandbox_info, | 764 &sandbox_info, |
| 753 &delegate); | 765 &delegate); |
| 754 | 766 |
| 755 // Note: In debug builds, we ExitProcess during PostDestroyThreads. | 767 // Note: In debug builds, we ExitProcess during PostDestroyThreads. |
| 756 return g_test_suite->test_result(); | 768 return g_test_suite->test_result(); |
| 757 } | 769 } |
| OLD | NEW |