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

Side by Side Diff: chrome_frame/test/navigation_test.cc

Issue 12779010: Attempt to fix flake in FullTabDownloadTest.CF_DownloadFileFromPost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: motion to fix other test binaries Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/test/mock_ie_event_sink_actions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/test/test_file_util.h" 8 #include "base/test/test_file_util.h"
9 #include "base/win/scoped_comptr.h" 9 #include "base/win/scoped_comptr.h"
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 742
743 // See bug http://crbug.com/36694 743 // See bug http://crbug.com/36694
744 // This test does the following:- 744 // This test does the following:-
745 // Navigates IE to a URL which in ChromeFrame. 745 // Navigates IE to a URL which in ChromeFrame.
746 // Performs a top level form post in the document 746 // Performs a top level form post in the document
747 // In response to the POST we send over an attachment via the 747 // In response to the POST we send over an attachment via the
748 // content-disposition header. 748 // content-disposition header.
749 // IE brings up a file open dialog in this context. 749 // IE brings up a file open dialog in this context.
750 // We bring up the Save dialog via accessibility and save the file 750 // We bring up the Save dialog via accessibility and save the file
751 // and validate that all is well. 751 // and validate that all is well.
752 TEST_F(FullTabDownloadTest, DISABLED_CF_DownloadFileFromPost) { 752 TEST_F(FullTabDownloadTest, CF_DownloadFileFromPost) {
753 // Please see http://code.google.com/p/chromium/issues/detail?id=60987 753 // Please see http://code.google.com/p/chromium/issues/detail?id=60987
754 // for more information on why this test is disabled for Vista with IE7. 754 // for more information on why this test is disabled for Vista with IE7.
755 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { 755 if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
756 if (GetInstalledIEVersion() == IE_7) { 756 if (GetInstalledIEVersion() == IE_7) {
757 LOG(INFO) << "Not running test on Vista with IE7"; 757 LOG(INFO) << "Not running test on Vista with IE7";
758 return; 758 return;
759 } else if (GetInstalledIEVersion() == IE_9) { 759 } else if (GetInstalledIEVersion() == IE_9) {
760 LOG(INFO) << "Not running test on Vista/Windows 7 with IE9"; 760 LOG(INFO) << "Not running test on Vista/Windows 7 with IE9";
761 return; 761 return;
762 } 762 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 EXPECT_CALL(save_dialog_watcher, OnWindowOpen(_)) 850 EXPECT_CALL(save_dialog_watcher, OnWindowOpen(_))
851 .WillOnce(testing::DoAll( 851 .WillOnce(testing::DoAll(
852 testing::Invoke(testing::CreateFunctor( 852 testing::Invoke(testing::CreateFunctor(
853 SaveOwnerWindow, &owner_window)), 853 SaveOwnerWindow, &owner_window)),
854 AccSendCharMessage(file_name_box, L'a'), 854 AccSendCharMessage(file_name_box, L'a'),
855 AccSetValue(file_name_box, temp_file_path.value()), 855 AccSetValue(file_name_box, temp_file_path.value()),
856 AccDoDefaultAction(AccObjectMatcher(L"Save", L"push button")))); 856 AccDoDefaultAction(AccObjectMatcher(L"Save", L"push button"))));
857 857
858 EXPECT_CALL(save_dialog_watcher, OnWindowClose(_)) 858 EXPECT_CALL(save_dialog_watcher, OnWindowClose(_))
859 .WillOnce(testing::DoAll( 859 .WillOnce(testing::DoAll(
860 WaitForFileSave(temp_file_path, 2000), 860 WaitForFileSave(temp_file_path, 3000),
861 testing::InvokeWithoutArgs( 861 testing::InvokeWithoutArgs(
862 testing::CreateFunctor(CloseWindow, &owner_window)), 862 testing::CreateFunctor(CloseWindow, &owner_window)),
863 CloseBrowserMock(&ie_mock_))); 863 CloseBrowserMock(&ie_mock_)));
864 LaunchIENavigateAndLoop(src_url, kChromeFrameVeryLongNavigationTimeout); 864 LaunchIENavigateAndLoop(src_url, kChromeFrameVeryLongNavigationTimeout);
865 865
866 std::string data; 866 std::string data;
867 EXPECT_TRUE(file_util::ReadFileToString(temp_file_path, &data)); 867 EXPECT_TRUE(file_util::ReadFileToString(temp_file_path, &data));
868 EXPECT_EQ("hello", data); 868 EXPECT_EQ("hello", data);
869 file_util::DieFileDie(temp_file_path, false); 869 file_util::DieFileDie(temp_file_path, false);
870 } 870 }
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 .WillOnce(CloseBrowserMock( 1282 .WillOnce(CloseBrowserMock(
1283 &no_referrer_target_opener_window_mock)); 1283 &no_referrer_target_opener_window_mock));
1284 1284
1285 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit()) 1285 EXPECT_CALL(no_referrer_target_opener_window_mock, OnQuit())
1286 .WillOnce(CloseBrowserMock(&ie_mock_)); 1286 .WillOnce(CloseBrowserMock(&ie_mock_));
1287 1287
1288 LaunchIENavigateAndLoop(initial_url, kChromeFrameVeryLongNavigationTimeout); 1288 LaunchIENavigateAndLoop(initial_url, kChromeFrameVeryLongNavigationTimeout);
1289 } 1289 }
1290 1290
1291 } // namespace chrome_frame_test 1291 } // namespace chrome_frame_test
OLDNEW
« no previous file with comments | « chrome_frame/test/mock_ie_event_sink_actions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698