Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: chrome_frame/test/ui_test.cc

Issue 7198017: Attempt to fix the following flaky ChromeFrame tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/ui_test.cc
===================================================================
--- chrome_frame/test/ui_test.cc (revision 90169)
+++ chrome_frame/test/ui_test.cc (working copy)
@@ -107,8 +107,7 @@
}
// Tests new window behavior with ctrl+N.
-// Flaky on Chrome Frame Tests (ie6), http://crbug.com/86251.
-TEST_P(FullTabUITest, FLAKY_CtrlN) {
+TEST_P(FullTabUITest, CtrlN) {
if (IsWorkstationLocked()) {
LOG(ERROR) << "This test cannot be run in a locked workstation.";
return;
@@ -135,15 +134,14 @@
// reliably delivered immediately upon receipt of the window open event.
EXPECT_CALL(win_observer_mock, OnWindowOpen(_))
.Times(testing::AtMost(2))
- .WillOnce(DelayDoCloseWindow(500))
+ .WillOnce(CloseBrowserMock(&ie_mock_))
.WillOnce(testing::Return());
EXPECT_CALL(win_observer_mock, OnWindowClose(_))
- .Times(testing::AtMost(2))
- .WillOnce(CloseBrowserMock(&ie_mock_))
- .WillOnce(testing::Return());
+ .Times(testing::AtMost(2));
- LaunchIEAndNavigate(GetSimplePageUrl());
+ LaunchIENavigateAndLoop(GetSimplePageUrl(),
+ kChromeFrameVeryLongNavigationTimeoutInSeconds);
}
// Test that Ctrl+F opens the Find dialog.
@@ -169,20 +167,15 @@
SetFocusToRenderer(&ie_mock_),
DelaySendChar(&loop_, 1500, 'f', simulate_input::CONTROL)));
- // Watch for find dialog. It appears that the window close message cannot be
- // reliably delivered immediately upon receipt of the window open event.
EXPECT_CALL(win_observer_mock, OnWindowOpen(_))
- .WillOnce(DelayDoCloseWindow(500));
-
- EXPECT_CALL(win_observer_mock, OnWindowClose(_))
.WillOnce(CloseBrowserMock(&ie_mock_));
- LaunchIEAndNavigate(GetSimplePageUrl());
+ LaunchIENavigateAndLoop(GetSimplePageUrl(),
+ kChromeFrameVeryLongNavigationTimeoutInSeconds);
}
// Test that ctrl+r does cause a refresh.
-// http://code.google.com/p/chromium/issues/detail?id=84297
-TEST_P(FullTabUITest, FLAKY_CtrlR) {
+TEST_P(FullTabUITest, CtrlR) {
if (IsWorkstationLocked()) {
LOG(ERROR) << "This test cannot be run in a locked workstation.";
return;
@@ -201,7 +194,8 @@
DelayCloseBrowserMock(&loop_, 4000, &ie_mock_)))
.WillRepeatedly(testing::Return());
- LaunchIEAndNavigate(GetSimplePageUrl());
+ LaunchIENavigateAndLoop(GetSimplePageUrl(),
+ kChromeFrameVeryLongNavigationTimeoutInSeconds);
}
// Test window close with ctrl+w.
@@ -217,12 +211,12 @@
SetFocusToRenderer(&ie_mock_),
DelaySendChar(&loop_, 1000, 'w', simulate_input::CONTROL)));
- LaunchIEAndNavigate(GetSimplePageUrl());
+ LaunchIENavigateAndLoop(GetSimplePageUrl(),
+ kChromeFrameVeryLongNavigationTimeoutInSeconds);
}
// Test address bar navigation with Alt+d and URL.
-// http://code.google.com/p/chromium/issues/detail?id=84297
-TEST_P(FullTabUITest, FLAKY_AltD) {
+TEST_P(FullTabUITest, AltD) {
if (IsWorkstationLocked()) {
LOG(ERROR) << "This test cannot be run in a locked workstation.";
return;
@@ -238,7 +232,8 @@
StrEq(GetLinkPageUrl())))
.WillOnce(CloseBrowserMock(&ie_mock_));
- LaunchIEAndNavigate(GetSimplePageUrl());
+ LaunchIENavigateAndLoop(GetSimplePageUrl(),
+ kChromeFrameVeryLongNavigationTimeoutInSeconds);
}
// Tests that the renderer has focus after navigation.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698