Commit 4e1eb7c7 authored by ananta@chromium.org's avatar ananta@chromium.org

Reenable the ChromeFrame ContextMenuTest.CFSaveLinkAs test. Increased the...

Reenable the ChromeFrame ContextMenuTest.CFSaveLinkAs test. Increased the timeout for the file save as
operation. Fixed a bug in the SaveFile action where there was a sleep before checking whether the timeout
had occurred.

BUG=83114
TEST=ChromeFrame ContextMenuTest.CFSaveLinkAs test should pass.
Review URL: http://codereview.chromium.org/7069023

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86706 0039d316-1c4b-4281-b951-d872f2087c98
parent 0f7bfbe1
...@@ -347,11 +347,11 @@ ACTION_P(VerifySelectedText, expected_text) { ...@@ -347,11 +347,11 @@ ACTION_P(VerifySelectedText, expected_text) {
ACTION_P3(CloseWhenFileSaved, mock, file, timeout_ms) { ACTION_P3(CloseWhenFileSaved, mock, file, timeout_ms) {
base::Time start = base::Time::Now(); base::Time start = base::Time::Now();
while (!file_util::PathExists(file)) { while (!file_util::PathExists(file)) {
base::PlatformThread::Sleep(200);
if ((base::Time::Now() - start).InMilliseconds() > timeout_ms) { if ((base::Time::Now() - start).InMilliseconds() > timeout_ms) {
ADD_FAILURE() << "File was not saved within timeout"; ADD_FAILURE() << "File was not saved within timeout";
break; break;
} }
base::PlatformThread::Sleep(200);
} }
mock->event_sink()->CloseWebBrowser(); mock->event_sink()->CloseWebBrowser();
} }
......
...@@ -426,7 +426,7 @@ class ContextMenuTest : public MockIEEventSinkTest, public testing::Test { ...@@ -426,7 +426,7 @@ class ContextMenuTest : public MockIEEventSinkTest, public testing::Test {
AccDoDefaultAction(AccObjectMatcher(L"Save", L"push button")))); AccDoDefaultAction(AccObjectMatcher(L"Save", L"push button"))));
EXPECT_CALL(win_observer_mock, OnWindowClose(_)) EXPECT_CALL(win_observer_mock, OnWindowClose(_))
.WillOnce(CloseWhenFileSaved(&ie_mock_, temp_file_path, 5000)); .WillOnce(CloseWhenFileSaved(&ie_mock_, temp_file_path, 8000));
LaunchIENavigateAndLoop(GetTestUrl(L"save_as_context_menu.html"), LaunchIENavigateAndLoop(GetTestUrl(L"save_as_context_menu.html"),
kChromeFrameVeryLongNavigationTimeoutInSeconds); kChromeFrameVeryLongNavigationTimeoutInSeconds);
...@@ -565,7 +565,7 @@ TEST_F(ContextMenuTest, FLAKY_CFSavePageAs) { ...@@ -565,7 +565,7 @@ TEST_F(ContextMenuTest, FLAKY_CFSavePageAs) {
} }
// http://code.google.com/p/chromium/issues/detail?id=83114 // http://code.google.com/p/chromium/issues/detail?id=83114
TEST_F(ContextMenuTest, DISABLED_CFSaveLinkAs) { TEST_F(ContextMenuTest, FLAKY_CFSaveLinkAs) {
// Please see http://code.google.com/p/chromium/issues/detail?id=60987 // Please see http://code.google.com/p/chromium/issues/detail?id=60987
// for more information on why this test is disabled for Vista with IE7. // for more information on why this test is disabled for Vista with IE7.
if (base::win::GetVersion() == base::win::VERSION_VISTA && if (base::win::GetVersion() == base::win::VERSION_VISTA &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment