summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 05:17:24 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-24 05:17:24 +0000
commit08f4d5ccb9a5b7558dccd4727ca1a5183478b9cf (patch)
tree65767b3b6ac89bdcbe8f6a071b214a8d2e8e0dcc /chrome_frame
parentac55e29f93a7f7edc2ddac6d909f5c25bf5d7cba (diff)
downloadchromium_src-08f4d5ccb9a5b7558dccd4727ca1a5183478b9cf.zip
chromium_src-08f4d5ccb9a5b7558dccd4727ca1a5183478b9cf.tar.gz
chromium_src-08f4d5ccb9a5b7558dccd4727ca1a5183478b9cf.tar.bz2
Attempt to fix the following flaky ChromeFrame tests
1. CtrlF, CtrlR, CtrlN, AltD, CtrlW. Fixes are basically increasing the timeouts of these tests and addressing the expectations of these tests to ensure that they pass reliably. BUG=84297, 86251 TBR=robertshield. Review URL: http://codereview.chromium.org/7198017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/ui_test.cc35
1 files changed, 15 insertions, 20 deletions
diff --git a/chrome_frame/test/ui_test.cc b/chrome_frame/test/ui_test.cc
index cde6e43..87eb028 100644
--- a/chrome_frame/test/ui_test.cc
+++ b/chrome_frame/test/ui_test.cc
@@ -107,8 +107,7 @@ TEST_P(FullTabUITest, FLAKY_KeyboardBackForward) {
}
// 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 @@ TEST_P(FullTabUITest, FLAKY_CtrlN) {
// 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 @@ TEST_P(FullTabUITest, CtrlF) {
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 @@ TEST_P(FullTabUITest, FLAKY_CtrlR) {
DelayCloseBrowserMock(&loop_, 4000, &ie_mock_)))
.WillRepeatedly(testing::Return());
- LaunchIEAndNavigate(GetSimplePageUrl());
+ LaunchIENavigateAndLoop(GetSimplePageUrl(),
+ kChromeFrameVeryLongNavigationTimeoutInSeconds);
}
// Test window close with ctrl+w.
@@ -217,12 +211,12 @@ TEST_P(FullTabUITest, CtrlW) {
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 @@ TEST_P(FullTabUITest, FLAKY_AltD) {
StrEq(GetLinkPageUrl())))
.WillOnce(CloseBrowserMock(&ie_mock_));
- LaunchIEAndNavigate(GetSimplePageUrl());
+ LaunchIENavigateAndLoop(GetSimplePageUrl(),
+ kChromeFrameVeryLongNavigationTimeoutInSeconds);
}
// Tests that the renderer has focus after navigation.