OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/scoped_comptr_win.h" | 7 #include "base/scoped_comptr_win.h" |
8 #include "base/test/test_file_util.h" | 8 #include "base/test/test_file_util.h" |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 #include "chrome_frame/test/chrome_frame_test_utils.h" | 10 #include "chrome_frame/test/chrome_frame_test_utils.h" |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 // Currently we run total 505 tests and 8 steps fail. | 971 // Currently we run total 505 tests and 8 steps fail. |
972 // TODO(amit): send results as JSON, diagnose and eliminate failures. | 972 // TODO(amit): send results as JSON, diagnose and eliminate failures. |
973 EXPECT_LE(failed_tests, 15) << "Expected failures: " << 15 << | 973 EXPECT_LE(failed_tests, 15) << "Expected failures: " << 15 << |
974 " Actual failures: " << failed_tests; | 974 " Actual failures: " << failed_tests; |
975 EXPECT_GE(num_tests, 500) << "Expected to run: " << 500 << " tests." << | 975 EXPECT_GE(num_tests, 500) << "Expected to run: " << 500 << " tests." << |
976 " Actual number of tests run: " << num_tests; | 976 " Actual number of tests run: " << num_tests; |
977 } | 977 } |
978 | 978 |
979 // Tests refreshing causes a page load. | 979 // Tests refreshing causes a page load. |
980 TEST_F(FullTabSeleniumTest, Core) { | 980 TEST_F(FullTabSeleniumTest, Core) { |
| 981 // Please see http://code.google.com/p/chromium/issues/detail?id=60987 |
| 982 // for more information on why this test is disabled for Vista with IE7. |
| 983 if (base::win::GetVersion() == base::win::VERSION_VISTA && |
| 984 GetInstalledIEVersion() == IE_7) { |
| 985 LOG(INFO) << "Not running test on Vista with IE7"; |
| 986 return; |
| 987 } |
| 988 |
981 server_mock_.ExpectAndServeAnyRequests(CFInvocation::HttpHeader()); | 989 server_mock_.ExpectAndServeAnyRequests(CFInvocation::HttpHeader()); |
982 std::wstring url = GetTestUrl(L"core/TestRunner.html"); | 990 std::wstring url = GetTestUrl(L"core/TestRunner.html"); |
983 | 991 |
984 // Expectations for TestRunner.html | 992 // Expectations for TestRunner.html |
985 EXPECT_CALL(ie_mock_, OnFileDownload(_, _)).Times(testing::AnyNumber()); | 993 EXPECT_CALL(ie_mock_, OnFileDownload(_, _)).Times(testing::AnyNumber()); |
986 EXPECT_CALL(ie_mock_, OnBeforeNavigate2(_, | 994 EXPECT_CALL(ie_mock_, OnBeforeNavigate2(_, |
987 testing::Field(&VARIANT::bstrVal, | 995 testing::Field(&VARIANT::bstrVal, |
988 testing::StartsWith(url)), _, _, _, _, _)) | 996 testing::StartsWith(url)), _, _, _, _, _)) |
989 .Times(testing::AnyNumber()); | 997 .Times(testing::AnyNumber()); |
990 EXPECT_CALL(ie_mock_, OnNavigateComplete2(_, | 998 EXPECT_CALL(ie_mock_, OnNavigateComplete2(_, |
(...skipping 22 matching lines...) Expand all Loading... |
1013 .WillOnce(testing::DoAll(VerifySeleniumCoreTestResults(), | 1021 .WillOnce(testing::DoAll(VerifySeleniumCoreTestResults(), |
1014 CloseBrowserMock(&ie_mock_))); | 1022 CloseBrowserMock(&ie_mock_))); |
1015 | 1023 |
1016 // Selenium tests take longer to finish, lets give it 2 mins. | 1024 // Selenium tests take longer to finish, lets give it 2 mins. |
1017 const int kSeleniumTestTimeout = 120; | 1025 const int kSeleniumTestTimeout = 120; |
1018 LaunchIENavigateAndLoop(url, kSeleniumTestTimeout); | 1026 LaunchIENavigateAndLoop(url, kSeleniumTestTimeout); |
1019 } | 1027 } |
1020 | 1028 |
1021 | 1029 |
1022 } // namespace chrome_frame_test | 1030 } // namespace chrome_frame_test |
OLD | NEW |