diff options
author | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 23:34:03 +0000 |
---|---|---|
committer | amit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 23:34:03 +0000 |
commit | 58d58c7b9d95c57f6bd9266c15fe173bb3264cc8 (patch) | |
tree | d260fae08ccaebbd32c55900ec632f344c00fe07 /chrome_frame/test | |
parent | dfe11e35a204afa2d0172e649f5c711cbce5158b (diff) | |
download | chromium_src-58d58c7b9d95c57f6bd9266c15fe173bb3264cc8.zip chromium_src-58d58c7b9d95c57f6bd9266c15fe173bb3264cc8.tar.gz chromium_src-58d58c7b9d95c57f6bd9266c15fe173bb3264cc8.tar.bz2 |
Some input tests no longer marked flaky
For tests like CtrlW, CtrlN it's better to notice failures
when they execute and not run them at all if the workstation
is locked i.e. when they will certainly fail. Added a check
to do exactly that :)
BUG=none
TESTS=CtrlR, CtrlW, CtrlN, CtrlF, AltD
Review URL: http://codereview.chromium.org/4615001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/ui_test.cc | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/chrome_frame/test/ui_test.cc b/chrome_frame/test/ui_test.cc index c308637..3d48f78 100644 --- a/chrome_frame/test/ui_test.cc +++ b/chrome_frame/test/ui_test.cc @@ -104,7 +104,12 @@ TEST_P(FullTabUITest, FLAKY_KeyboardBackForward) { } // Tests new window behavior with ctrl+N. -TEST_P(FullTabUITest, FLAKY_CtrlN) { +TEST_P(FullTabUITest, CtrlN) { + if (IsWorkstationLocked()) { + LOG(ERROR) << "This test cannot be run in a locked workstation."; + return; + } + bool is_cf = GetParam().invokes_cf(); if (!is_cf) { LOG(ERROR) << "Test not implemented for this configuration."; @@ -134,7 +139,12 @@ TEST_P(FullTabUITest, FLAKY_CtrlN) { } // Test that Ctrl+F opens the Find dialog. -TEST_P(FullTabUITest, FLAKY_CtrlF) { +TEST_P(FullTabUITest, CtrlF) { + if (IsWorkstationLocked()) { + LOG(ERROR) << "This test cannot be run in a locked workstation."; + return; + } + bool is_cf = GetParam().invokes_cf(); if (!is_cf) { LOG(ERROR) << "Test not implemented for this configuration."; @@ -163,7 +173,12 @@ TEST_P(FullTabUITest, FLAKY_CtrlF) { } // Test that ctrl+r does cause a refresh. -TEST_P(FullTabUITest, FLAKY_CtrlR) { +TEST_P(FullTabUITest, CtrlR) { + if (IsWorkstationLocked()) { + LOG(ERROR) << "This test cannot be run in a locked workstation."; + return; + } + InSequence expect_in_sequence_for_scope; EXPECT_CALL(ie_mock_, OnLoad(GetParam().invokes_cf(), @@ -181,7 +196,12 @@ TEST_P(FullTabUITest, FLAKY_CtrlR) { } // Test window close with ctrl+w. -TEST_P(FullTabUITest, FLAKY_CtrlW) { +TEST_P(FullTabUITest, CtrlW) { + if (IsWorkstationLocked()) { + LOG(ERROR) << "This test cannot be run in a locked workstation."; + return; + } + EXPECT_CALL(ie_mock_, OnLoad(GetParam().invokes_cf(), StrEq(GetSimplePageUrl()))) .WillOnce(testing::DoAll( @@ -192,7 +212,12 @@ TEST_P(FullTabUITest, FLAKY_CtrlW) { } // Test address bar navigation with Alt+d and URL. -TEST_P(FullTabUITest, FLAKY_AltD) { +TEST_P(FullTabUITest, AltD) { + if (IsWorkstationLocked()) { + LOG(ERROR) << "This test cannot be run in a locked workstation."; + return; + } + EXPECT_CALL(ie_mock_, OnLoad(GetParam().invokes_cf(), StrEq(GetSimplePageUrl()))) .WillOnce(testing::DoAll( |