summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/no_interference_test.cc25
1 files changed, 8 insertions, 17 deletions
diff --git a/chrome_frame/test/no_interference_test.cc b/chrome_frame/test/no_interference_test.cc
index 5e68c6f..d02ecdb 100644
--- a/chrome_frame/test/no_interference_test.cc
+++ b/chrome_frame/test/no_interference_test.cc
@@ -166,17 +166,12 @@ TEST_F(NoInterferenceTest, FLAKY_JavascriptWindowOpen) {
empty_page_url())),
DelayCloseBrowserMock(&loop_, 2000, &new_window_mock)));
- if (chrome_frame_test::GetInstalledIEVersion() == IE_7) {
- // On IE7 the DocumentComplete fires twice for new windows. Hack to account
- // for that.
- testing::InSequence seq;
+ if (chrome_frame_test::GetInstalledIEVersion() != IE_6) {
+ // On IE7/8 the DocumentComplete at times fires twice for new windows. Hack
+ // to account for that.
EXPECT_CALL(new_window_mock,
OnIELoad(testing::StrCaseEq(empty_page_url())))
- .Times(1);
-
- EXPECT_CALL(new_window_mock,
- OnIELoad(testing::StrCaseEq(empty_page_url())))
- .Times(1);
+ .Times(testing::AtMost(2));
} else {
EXPECT_CALL(new_window_mock,
OnIELoad(testing::StrCaseEq(empty_page_url())))
@@ -263,18 +258,14 @@ TEST_F(NoInterferenceTest, FLAKY_SelectContextMenuOpenInNewWindow) {
SelectItem(&loop_, 1500, open_new_window_index)));
mock_.ExpectNewWindowWithIE(empty_page_url(), &new_window_mock);
- if (chrome_frame_test::GetInstalledIEVersion() == IE_7) {
- // On IE7 the DocumentComplete fires twice for new windows. Hack to account
- // for that.
- testing::InSequence seq;
- EXPECT_CALL(new_window_mock,
- OnIELoad(testing::StrCaseEq(empty_page_url())))
- .Times(1);
-
+ if (chrome_frame_test::GetInstalledIEVersion() != IE_6) {
+ // On IE6/7 the DocumentComplete at times fires twice for new windows. Hack
+ // to account for that.
// TODO(kkania): Verifying the address bar is flaky with this, at least
// on XP ie6. Fix.
EXPECT_CALL(new_window_mock,
OnIELoad(testing::StrCaseEq(empty_page_url())))
+ .Times(testing::AtMost(2))
.WillOnce(DelayCloseBrowserMock(&loop_, 2000, &new_window_mock));
} else {
// TODO(kkania): Verifying the address bar is flaky with this, at least