summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 22:24:44 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-13 22:24:44 +0000
commitd689bddd30ebfa891b5fa440d4a79237fc1035f9 (patch)
treed3e3bb81104ba18787d053b7105da2d217609c3f /chrome_frame
parent5a7f86378c1d192d13700c6b3e57441aeaaa088e (diff)
downloadchromium_src-d689bddd30ebfa891b5fa440d4a79237fc1035f9.zip
chromium_src-d689bddd30ebfa891b5fa440d4a79237fc1035f9.tar.gz
chromium_src-d689bddd30ebfa891b5fa440d4a79237fc1035f9.tar.bz2
Fix the ChromeFrame SaveAs test which always failed on the chrome frame builder. This test creates a temporary file name and feeds
the path to the SaveAs dialog put up by Chrome. If the file already existed the test fails. The other problem was that Chrome appends the .htm extension to the path passed in which caused the subsequent GetFileAttributes expectation to fail. Fix is to replace the .tmp extension in the temporary file name with .htm and to delete the file initially before starting the test. This test is still marked as flaky as it expects programmatic keyboard input. Review URL: http://codereview.chromium.org/1613015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/test_mock_with_web_server.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome_frame/test/test_mock_with_web_server.cc b/chrome_frame/test/test_mock_with_web_server.cc
index c777b37..27c44a3 100644
--- a/chrome_frame/test/test_mock_with_web_server.cc
+++ b/chrome_frame/test/test_mock_with_web_server.cc
@@ -1120,8 +1120,11 @@ TEST_F(ChromeFrameTestWithWebServer,
FilePath temp_file_path;
EXPECT_TRUE(file_util::CreateTemporaryFile(&temp_file_path));
+ temp_file_path = temp_file_path.ReplaceExtension(L".htm");
const wchar_t* kSaveFileName = temp_file_path.value().c_str();
+ DeleteFile(kSaveFileName);
+
const char* kSaveDlgCaption = "Save As";
EXPECT_CALL(mock, OnWindowDetected(_, testing::StrCaseEq(kSaveDlgCaption)))
.WillOnce(testing::DoAll(