| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/test_file_util.h" | 7 #include "base/test/test_file_util.h" |
| 8 #include "base/win/scoped_comptr.h" | 8 #include "base/win/scoped_comptr.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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 if (GetInstalledIEVersion() == IE_7) { | 101 if (GetInstalledIEVersion() == IE_7) { |
| 102 LOG(ERROR) << "Test disabled for this configuration."; | 102 LOG(ERROR) << "Test disabled for this configuration."; |
| 103 return; | 103 return; |
| 104 } | 104 } |
| 105 bool in_cf = GetParam().invokes_cf(); | 105 bool in_cf = GetParam().invokes_cf(); |
| 106 server_mock_.ExpectAndServeAnyRequests(GetParam()); | 106 server_mock_.ExpectAndServeAnyRequests(GetParam()); |
| 107 InSequence expect_in_sequence_for_scope; | 107 InSequence expect_in_sequence_for_scope; |
| 108 | 108 |
| 109 ie_mock_.ExpectNavigation(IN_IE, GetSimplePageUrl()); | 109 ie_mock_.ExpectNavigation(IN_IE, GetSimplePageUrl()); |
| 110 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetSimplePageUrl()))) | 110 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetSimplePageUrl()))) |
| 111 .WillOnce(DelayRefresh(&ie_mock_, &loop_, 0)); | 111 .WillOnce(DelayRefresh(&ie_mock_, &loop_, base::TimeDelta())); |
| 112 | 112 |
| 113 if (in_cf) { | 113 if (in_cf) { |
| 114 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetSimplePageUrl()))) | 114 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetSimplePageUrl()))) |
| 115 .WillOnce(CloseBrowserMock(&ie_mock_)); | 115 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 116 } else { | 116 } else { |
| 117 // For some reason IE still requests the resource again, but does not | 117 // For some reason IE still requests the resource again, but does not |
| 118 // trigger another load. | 118 // trigger another load. |
| 119 EXPECT_CALL(server_mock_, Get(_, UrlPathEq(GetSimplePageUrl()), _)) | 119 EXPECT_CALL(server_mock_, Get(_, UrlPathEq(GetSimplePageUrl()), _)) |
| 120 .WillOnce(CloseBrowserMock(&ie_mock_)); | 120 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 121 } | 121 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 146 .WillOnce(testing::DoAll( | 146 .WillOnce(testing::DoAll( |
| 147 VerifyAddressBarUrl(&ie_mock_), | 147 VerifyAddressBarUrl(&ie_mock_), |
| 148 Navigate(&ie_mock_, page3))); | 148 Navigate(&ie_mock_, page3))); |
| 149 | 149 |
| 150 // We have reached url 3 and have two back entries for url 1 & 2. | 150 // We have reached url 3 and have two back entries for url 1 & 2. |
| 151 // Go back to url 2 now. | 151 // Go back to url 2 now. |
| 152 ie_mock_.ExpectNavigation(in_cf, page3); | 152 ie_mock_.ExpectNavigation(in_cf, page3); |
| 153 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page3))) | 153 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page3))) |
| 154 .WillOnce(testing::DoAll( | 154 .WillOnce(testing::DoAll( |
| 155 VerifyAddressBarUrl(&ie_mock_), | 155 VerifyAddressBarUrl(&ie_mock_), |
| 156 DelayGoBack(&ie_mock_, &loop_, 0))); | 156 DelayGoBack(&ie_mock_, &loop_, base::TimeDelta()))); |
| 157 | 157 |
| 158 // We have reached url 2 and have 1 back & 1 forward entries for url 1 & 3. | 158 // We have reached url 2 and have 1 back & 1 forward entries for url 1 & 3. |
| 159 // Go back to url 1 now. | 159 // Go back to url 1 now. |
| 160 ie_mock_.ExpectNavigation(in_cf, page2); | 160 ie_mock_.ExpectNavigation(in_cf, page2); |
| 161 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page2))) | 161 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page2))) |
| 162 .WillOnce(testing::DoAll( | 162 .WillOnce(testing::DoAll( |
| 163 VerifyAddressBarUrl(&ie_mock_), | 163 VerifyAddressBarUrl(&ie_mock_), |
| 164 DelayGoBack(&ie_mock_, &loop_, 0))); | 164 DelayGoBack(&ie_mock_, &loop_, base::TimeDelta()))); |
| 165 | 165 |
| 166 // We have reached url 1 and have 0 back & 2 forward entries for url 2 & 3. | 166 // We have reached url 1 and have 0 back & 2 forward entries for url 2 & 3. |
| 167 // Go forward to url 2 now. | 167 // Go forward to url 2 now. |
| 168 ie_mock_.ExpectNavigation(in_cf, page1); | 168 ie_mock_.ExpectNavigation(in_cf, page1); |
| 169 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page1))) | 169 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page1))) |
| 170 .WillOnce(testing::DoAll( | 170 .WillOnce(testing::DoAll( |
| 171 VerifyAddressBarUrl(&ie_mock_), | 171 VerifyAddressBarUrl(&ie_mock_), |
| 172 DelayGoForward(&ie_mock_, &loop_, 0))); | 172 DelayGoForward(&ie_mock_, &loop_, base::TimeDelta()))); |
| 173 | 173 |
| 174 // We have reached url 2 and have 1 back & 1 forward entries for url 1 & 3. | 174 // We have reached url 2 and have 1 back & 1 forward entries for url 1 & 3. |
| 175 // Go forward to url 3 now. | 175 // Go forward to url 3 now. |
| 176 ie_mock_.ExpectNavigation(in_cf, page2); | 176 ie_mock_.ExpectNavigation(in_cf, page2); |
| 177 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page2))) | 177 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page2))) |
| 178 .WillOnce(testing::DoAll( | 178 .WillOnce(testing::DoAll( |
| 179 VerifyAddressBarUrl(&ie_mock_), | 179 VerifyAddressBarUrl(&ie_mock_), |
| 180 DelayGoForward(&ie_mock_, &loop_, 0))); | 180 DelayGoForward(&ie_mock_, &loop_, base::TimeDelta()))); |
| 181 | 181 |
| 182 // We have reached url 2 and have 1 back & 1 forward entries for url 1 & 3. | 182 // We have reached url 2 and have 1 back & 1 forward entries for url 1 & 3. |
| 183 ie_mock_.ExpectNavigation(in_cf, page3); | 183 ie_mock_.ExpectNavigation(in_cf, page3); |
| 184 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page3))) | 184 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(page3))) |
| 185 .WillOnce(testing::DoAll( | 185 .WillOnce(testing::DoAll( |
| 186 VerifyAddressBarUrl(&ie_mock_), | 186 VerifyAddressBarUrl(&ie_mock_), |
| 187 CloseBrowserMock(&ie_mock_))); | 187 CloseBrowserMock(&ie_mock_))); |
| 188 | 188 |
| 189 LaunchIENavigateAndLoop(page1, kChromeFrameLongNavigationTimeout * 2); | 189 LaunchIENavigateAndLoop(page1, kChromeFrameLongNavigationTimeout * 2); |
| 190 } | 190 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 AccObjectMatcher(L"*3", L"link")))); | 230 AccObjectMatcher(L"*3", L"link")))); |
| 231 | 231 |
| 232 // We will reach anchor 3 once the navigation is complete, | 232 // We will reach anchor 3 once the navigation is complete, |
| 233 // then go back to anchor 2 | 233 // then go back to anchor 2 |
| 234 // Back/Forward state at this point: | 234 // Back/Forward state at this point: |
| 235 // Back: 3 (kAnchorUrl, kAnchor1Url, kAnchor2Url) | 235 // Back: 3 (kAnchorUrl, kAnchor1Url, kAnchor2Url) |
| 236 // Forward: 0 | 236 // Forward: 0 |
| 237 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(3)))) | 237 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(3)))) |
| 238 .WillOnce(testing::DoAll( | 238 .WillOnce(testing::DoAll( |
| 239 VerifyAddressBarUrl(&ie_mock_), | 239 VerifyAddressBarUrl(&ie_mock_), |
| 240 DelayGoBack(&ie_mock_, &loop_, 0))); | 240 DelayGoBack(&ie_mock_, &loop_, base::TimeDelta()))); |
| 241 | 241 |
| 242 // We will reach anchor 2 once the navigation is complete, | 242 // We will reach anchor 2 once the navigation is complete, |
| 243 // then go back to anchor 1 | 243 // then go back to anchor 1 |
| 244 // Back/Forward state at this point: | 244 // Back/Forward state at this point: |
| 245 // Back: 3 (kAnchorUrl, kAnchor1Url, kAnchor2Url) | 245 // Back: 3 (kAnchorUrl, kAnchor1Url, kAnchor2Url) |
| 246 // Forward: 1 (kAnchor3Url) | 246 // Forward: 1 (kAnchor3Url) |
| 247 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(2)))) | 247 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(2)))) |
| 248 .WillOnce(testing::DoAll( | 248 .WillOnce(testing::DoAll( |
| 249 VerifyAddressBarUrl(&ie_mock_), | 249 VerifyAddressBarUrl(&ie_mock_), |
| 250 DelayGoBack(&ie_mock_, &loop_, 0))); | 250 DelayGoBack(&ie_mock_, &loop_, base::TimeDelta()))); |
| 251 | 251 |
| 252 // We will reach anchor 1 once the navigation is complete, | 252 // We will reach anchor 1 once the navigation is complete, |
| 253 // now go forward to anchor 2 | 253 // now go forward to anchor 2 |
| 254 // Back/Forward state at this point: | 254 // Back/Forward state at this point: |
| 255 // Back: 2 (kAnchorUrl, kAnchor1Url) | 255 // Back: 2 (kAnchorUrl, kAnchor1Url) |
| 256 // Forward: 2 (kAnchor2Url, kAnchor3Url) | 256 // Forward: 2 (kAnchor2Url, kAnchor3Url) |
| 257 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(1)))) | 257 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(1)))) |
| 258 .WillOnce(testing::DoAll( | 258 .WillOnce(testing::DoAll( |
| 259 VerifyAddressBarUrl(&ie_mock_), | 259 VerifyAddressBarUrl(&ie_mock_), |
| 260 DelayGoForward(&ie_mock_, &loop_, 0))); | 260 DelayGoForward(&ie_mock_, &loop_, base::TimeDelta()))); |
| 261 | 261 |
| 262 // We have reached anchor 2, go forward to anchor 3 again | 262 // We have reached anchor 2, go forward to anchor 3 again |
| 263 // Back/Forward state at this point: | 263 // Back/Forward state at this point: |
| 264 // Back: 3 (kAnchorUrl, kAnchor1Url, kAnchor2Url) | 264 // Back: 3 (kAnchorUrl, kAnchor1Url, kAnchor2Url) |
| 265 // Forward: 1 (kAnchor3Url) | 265 // Forward: 1 (kAnchor3Url) |
| 266 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(2)))) | 266 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(2)))) |
| 267 .WillOnce(testing::DoAll( | 267 .WillOnce(testing::DoAll( |
| 268 VerifyAddressBarUrl(&ie_mock_), | 268 VerifyAddressBarUrl(&ie_mock_), |
| 269 DelayGoForward(&ie_mock_, &loop_, 0))); | 269 DelayGoForward(&ie_mock_, &loop_, base::TimeDelta()))); |
| 270 | 270 |
| 271 // We have gone a few steps back and forward, this should be enough for now. | 271 // We have gone a few steps back and forward, this should be enough for now. |
| 272 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(3)))) | 272 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(GetAnchorPageUrl(3)))) |
| 273 .WillOnce(CloseBrowserMock(&ie_mock_)); | 273 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 274 | 274 |
| 275 LaunchIEAndNavigate(GetAnchorPageUrl(0)); | 275 LaunchIEAndNavigate(GetAnchorPageUrl(0)); |
| 276 } | 276 } |
| 277 | 277 |
| 278 // Test that a user cannot navigate to a restricted site and that the security | 278 // Test that a user cannot navigate to a restricted site and that the security |
| 279 // dialog appears. | 279 // dialog appears. |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 | 673 |
| 674 InSequence expect_in_sequence_for_scope; | 674 InSequence expect_in_sequence_for_scope; |
| 675 | 675 |
| 676 ie_mock_.ExpectNavigation(in_cf, kFormPostUrl); | 676 ie_mock_.ExpectNavigation(in_cf, kFormPostUrl); |
| 677 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostUrl))); | 677 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostUrl))); |
| 678 | 678 |
| 679 ie_mock_.ExpectNavigationOptionalBefore(in_cf, kFormPostActionUrl); | 679 ie_mock_.ExpectNavigationOptionalBefore(in_cf, kFormPostActionUrl); |
| 680 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostActionUrl))) | 680 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostActionUrl))) |
| 681 .WillOnce(testing::DoAll( | 681 .WillOnce(testing::DoAll( |
| 682 VerifyAddressBarUrl(&ie_mock_), | 682 VerifyAddressBarUrl(&ie_mock_), |
| 683 DelayGoBack(&ie_mock_, &loop_, 0))); | 683 DelayGoBack(&ie_mock_, &loop_, base::TimeDelta()))); |
| 684 | 684 |
| 685 ie_mock_.ExpectNavigation(in_cf, kFormPostUrl); | 685 ie_mock_.ExpectNavigation(in_cf, kFormPostUrl); |
| 686 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostUrl))) | 686 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostUrl))) |
| 687 .WillOnce(testing::DoAll( | 687 .WillOnce(testing::DoAll( |
| 688 VerifyAddressBarUrl(&ie_mock_), | 688 VerifyAddressBarUrl(&ie_mock_), |
| 689 DelayGoForward(&ie_mock_, &loop_, 0))); | 689 DelayGoForward(&ie_mock_, &loop_, base::TimeDelta()))); |
| 690 | 690 |
| 691 ie_mock_.ExpectNavigationOptionalBefore(in_cf, kFormPostActionUrl); | 691 ie_mock_.ExpectNavigationOptionalBefore(in_cf, kFormPostActionUrl); |
| 692 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostActionUrl))) | 692 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostActionUrl))) |
| 693 .WillOnce(CloseBrowserMock(&ie_mock_)); | 693 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 694 | 694 |
| 695 LaunchIEAndNavigate(kFormPostUrl); | 695 LaunchIEAndNavigate(kFormPostUrl); |
| 696 } | 696 } |
| 697 | 697 |
| 698 TEST_P(FullTabNavigationTest, CF_UnloadEventTest) { | 698 TEST_P(FullTabNavigationTest, CF_UnloadEventTest) { |
| 699 bool in_cf = GetParam().invokes_cf(); | 699 bool in_cf = GetParam().invokes_cf(); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 | 956 |
| 957 EXPECT_CALL(ie_mock_, | 957 EXPECT_CALL(ie_mock_, |
| 958 OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal, | 958 OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal, |
| 959 StrEq(src_url)), | 959 StrEq(src_url)), |
| 960 _, _, _, _, _)); | 960 _, _, _, _, _)); |
| 961 EXPECT_CALL(ie_mock_, | 961 EXPECT_CALL(ie_mock_, |
| 962 OnNavigateComplete2(_, testing::Field(&VARIANT::bstrVal, | 962 OnNavigateComplete2(_, testing::Field(&VARIANT::bstrVal, |
| 963 StrEq(src_url)))); | 963 StrEq(src_url)))); |
| 964 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(src_url))) | 964 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(src_url))) |
| 965 .Times(2) | 965 .Times(2) |
| 966 .WillOnce(DelayRefresh(&ie_mock_, &loop_, 50)) | 966 .WillOnce(DelayRefresh( |
| 967 &ie_mock_, &loop_, base::TimeDelta::FromMilliseconds(50))) |
| 967 .WillOnce(CloseBrowserMock(&ie_mock_)); | 968 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 968 | 969 |
| 969 LaunchIENavigateAndLoop(src_url, kChromeFrameVeryLongNavigationTimeout); | 970 LaunchIENavigateAndLoop(src_url, kChromeFrameVeryLongNavigationTimeout); |
| 970 } | 971 } |
| 971 | 972 |
| 972 class FullTabSeleniumTest | 973 class FullTabSeleniumTest |
| 973 : public MockIEEventSinkTest, public testing::TestWithParam<CFInvocation> { | 974 : public MockIEEventSinkTest, public testing::TestWithParam<CFInvocation> { |
| 974 public: | 975 public: |
| 975 FullTabSeleniumTest() | 976 FullTabSeleniumTest() |
| 976 : MockIEEventSinkTest(1337, L"127.0.0.1", GetSeleniumTestFolder()) {} | 977 : MockIEEventSinkTest(1337, L"127.0.0.1", GetSeleniumTestFolder()) {} |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 EXPECT_CALL(ie_mock_, OnBeforeNavigate2(_, | 1096 EXPECT_CALL(ie_mock_, OnBeforeNavigate2(_, |
| 1096 testing::Field(&VARIANT::bstrVal, | 1097 testing::Field(&VARIANT::bstrVal, |
| 1097 StrEq(src_url)), _, _, _, _, _)); | 1098 StrEq(src_url)), _, _, _, _, _)); |
| 1098 EXPECT_CALL(ie_mock_, OnNavigateComplete2(_, | 1099 EXPECT_CALL(ie_mock_, OnNavigateComplete2(_, |
| 1099 testing::Field(&VARIANT::bstrVal, | 1100 testing::Field(&VARIANT::bstrVal, |
| 1100 StrEq(src_url)))); | 1101 StrEq(src_url)))); |
| 1101 EXPECT_CALL(ie_mock_, OnLoad(false, StrEq(src_url))); | 1102 EXPECT_CALL(ie_mock_, OnLoad(false, StrEq(src_url))); |
| 1102 | 1103 |
| 1103 EXPECT_CALL(ie_mock_, OnLoad(true, StrEq(tgt_url))) | 1104 EXPECT_CALL(ie_mock_, OnLoad(true, StrEq(tgt_url))) |
| 1104 .Times(2) | 1105 .Times(2) |
| 1105 .WillOnce(DelayRefresh(&ie_mock_, &loop_, 50)) | 1106 .WillOnce(DelayRefresh( |
| 1107 &ie_mock_, &loop_, base::TimeDelta::FromMilliseconds(50))) |
| 1106 .WillOnce(CloseBrowserMock(&ie_mock_)); | 1108 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 1107 | 1109 |
| 1108 EXPECT_CALL(ie_mock_, OnBeforeNavigate2(_, | 1110 EXPECT_CALL(ie_mock_, OnBeforeNavigate2(_, |
| 1109 testing::Field(&VARIANT::bstrVal, | 1111 testing::Field(&VARIANT::bstrVal, |
| 1110 StrEq(tgt_url)), _, _, _, _, _)) | 1112 StrEq(tgt_url)), _, _, _, _, _)) |
| 1111 .Times(2); | 1113 .Times(2); |
| 1112 | 1114 |
| 1113 EXPECT_CALL(ie_mock_, OnNavigateComplete2(_, | 1115 EXPECT_CALL(ie_mock_, OnNavigateComplete2(_, |
| 1114 testing::Field(&VARIANT::bstrVal, | 1116 testing::Field(&VARIANT::bstrVal, |
| 1115 StrEq(tgt_url)))) | 1117 StrEq(tgt_url)))) |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal, | 1184 OnBeforeNavigate2(_, testing::Field(&VARIANT::bstrVal, |
| 1183 StrEq(src_url)), | 1185 StrEq(src_url)), |
| 1184 _, _, _, _, _)); | 1186 _, _, _, _, _)); |
| 1185 EXPECT_CALL(ie_mock_, | 1187 EXPECT_CALL(ie_mock_, |
| 1186 OnNavigateComplete2(_, testing::Field(&VARIANT::bstrVal, | 1188 OnNavigateComplete2(_, testing::Field(&VARIANT::bstrVal, |
| 1187 StrEq(src_url)))); | 1189 StrEq(src_url)))); |
| 1188 if (in_cf) { | 1190 if (in_cf) { |
| 1189 // As mentioned above, end the test once the refreshed document is loaded. | 1191 // As mentioned above, end the test once the refreshed document is loaded. |
| 1190 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(src_url))) | 1192 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(src_url))) |
| 1191 .Times(2) | 1193 .Times(2) |
| 1192 .WillOnce(DelayRefresh(&ie_mock_, &loop_, 50)) | 1194 .WillOnce(DelayRefresh( |
| 1195 &ie_mock_, &loop_, base::TimeDelta::FromMilliseconds(50))) |
| 1193 .WillOnce(CloseBrowserMock(&ie_mock_)); | 1196 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 1194 } else { | 1197 } else { |
| 1195 // As mentioned above, we only receive an OnLoad for the intial load, not | 1198 // As mentioned above, we only receive an OnLoad for the intial load, not |
| 1196 // for the refresh. | 1199 // for the refresh. |
| 1197 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(src_url))) | 1200 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(src_url))) |
| 1198 .WillOnce(DelayRefresh(&ie_mock_, &loop_, 50)); | 1201 .WillOnce(DelayRefresh( |
| 1202 &ie_mock_, &loop_, base::TimeDelta::FromMilliseconds(50))); |
| 1199 } | 1203 } |
| 1200 | 1204 |
| 1201 LaunchIENavigateAndLoop(src_url, kChromeFrameVeryLongNavigationTimeout); | 1205 LaunchIENavigateAndLoop(src_url, kChromeFrameVeryLongNavigationTimeout); |
| 1202 } | 1206 } |
| 1203 | 1207 |
| 1204 // Link navigations in the same domain specified with the noreferrer flag | 1208 // Link navigations in the same domain specified with the noreferrer flag |
| 1205 // should be opened in the host browser. | 1209 // should be opened in the host browser. |
| 1206 TEST_F(FullTabNavigationTest, JavascriptWindowOpenNoReferrerOpensInHost) { | 1210 TEST_F(FullTabNavigationTest, JavascriptWindowOpenNoReferrerOpensInHost) { |
| 1207 // Please see http://code.google.com/p/chromium/issues/detail?id=60987 | 1211 // Please see http://code.google.com/p/chromium/issues/detail?id=60987 |
| 1208 // for more information on why this test is disabled for Vista with IE7. | 1212 // for more information on why this test is disabled for Vista with IE7. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 .WillOnce(CloseBrowserMock( | 1281 .WillOnce(CloseBrowserMock( |
| 1278 &no_referrer_target_opener_window_mock)); | 1282 &no_referrer_target_opener_window_mock)); |
| 1279 | 1283 |
| 1280 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) | 1284 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) |
| 1281 .WillOnce(CloseBrowserMock(&ie_mock_)); | 1285 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 1282 | 1286 |
| 1283 LaunchIENavigateAndLoop(initial_url, kChromeFrameVeryLongNavigationTimeout); | 1287 LaunchIENavigateAndLoop(initial_url, kChromeFrameVeryLongNavigationTimeout); |
| 1284 } | 1288 } |
| 1285 | 1289 |
| 1286 } // namespace chrome_frame_test | 1290 } // namespace chrome_frame_test |
| OLD | NEW |