OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <mshtmcid.h> | 5 #include <mshtmcid.h> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/test/test_file_util.h" | 8 #include "base/test/test_file_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "base/win/scoped_bstr.h" | 10 #include "base/win/scoped_bstr.h" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 temp_file_path = temp_file_path.ReplaceExtension(file_ext); | 419 temp_file_path = temp_file_path.ReplaceExtension(file_ext); |
420 | 420 |
421 AccObjectMatcher file_name_box(L"File name:", L"editable text"); | 421 AccObjectMatcher file_name_box(L"File name:", L"editable text"); |
422 EXPECT_CALL(win_observer_mock, OnWindowOpen(_)) | 422 EXPECT_CALL(win_observer_mock, OnWindowOpen(_)) |
423 .WillOnce(testing::DoAll( | 423 .WillOnce(testing::DoAll( |
424 AccSendCharMessage(file_name_box, L'a'), | 424 AccSendCharMessage(file_name_box, L'a'), |
425 AccSetValue(file_name_box, temp_file_path.value()), | 425 AccSetValue(file_name_box, temp_file_path.value()), |
426 AccDoDefaultAction(AccObjectMatcher(L"Save", L"push button")))); | 426 AccDoDefaultAction(AccObjectMatcher(L"Save", L"push button")))); |
427 | 427 |
428 EXPECT_CALL(win_observer_mock, OnWindowClose(_)) | 428 EXPECT_CALL(win_observer_mock, OnWindowClose(_)) |
429 .WillOnce(CloseWhenFileSaved(&ie_mock_, temp_file_path, 5000)); | 429 .WillOnce(CloseWhenFileSaved(&ie_mock_, temp_file_path, 8000)); |
430 | 430 |
431 LaunchIENavigateAndLoop(GetTestUrl(L"save_as_context_menu.html"), | 431 LaunchIENavigateAndLoop(GetTestUrl(L"save_as_context_menu.html"), |
432 kChromeFrameVeryLongNavigationTimeoutInSeconds); | 432 kChromeFrameVeryLongNavigationTimeoutInSeconds); |
433 ASSERT_TRUE(file_util::DieFileDie(temp_file_path, false)); | 433 ASSERT_TRUE(file_util::DieFileDie(temp_file_path, false)); |
434 } | 434 } |
435 | 435 |
436 protected: | 436 protected: |
437 // Html page that holds a text field for context menu testing. | 437 // Html page that holds a text field for context menu testing. |
438 std::wstring context_menu_page_url; | 438 std::wstring context_menu_page_url; |
439 // This is the text value used to test cut/copy/paste etc. | 439 // This is the text value used to test cut/copy/paste etc. |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // for more information on why this test is disabled for Vista with IE7. | 558 // for more information on why this test is disabled for Vista with IE7. |
559 if (base::win::GetVersion() == base::win::VERSION_VISTA && | 559 if (base::win::GetVersion() == base::win::VERSION_VISTA && |
560 GetInstalledIEVersion() == IE_7) { | 560 GetInstalledIEVersion() == IE_7) { |
561 LOG(INFO) << "Not running test on Vista with IE7"; | 561 LOG(INFO) << "Not running test on Vista with IE7"; |
562 return; | 562 return; |
563 } | 563 } |
564 ASSERT_NO_FATAL_FAILURE(DoSaveAsTest(L"", L"Save as...", L".html")); | 564 ASSERT_NO_FATAL_FAILURE(DoSaveAsTest(L"", L"Save as...", L".html")); |
565 } | 565 } |
566 | 566 |
567 // http://code.google.com/p/chromium/issues/detail?id=83114 | 567 // http://code.google.com/p/chromium/issues/detail?id=83114 |
568 TEST_F(ContextMenuTest, DISABLED_CFSaveLinkAs) { | 568 TEST_F(ContextMenuTest, FLAKY_CFSaveLinkAs) { |
569 // Please see http://code.google.com/p/chromium/issues/detail?id=60987 | 569 // Please see http://code.google.com/p/chromium/issues/detail?id=60987 |
570 // for more information on why this test is disabled for Vista with IE7. | 570 // for more information on why this test is disabled for Vista with IE7. |
571 if (base::win::GetVersion() == base::win::VERSION_VISTA && | 571 if (base::win::GetVersion() == base::win::VERSION_VISTA && |
572 GetInstalledIEVersion() == IE_7) { | 572 GetInstalledIEVersion() == IE_7) { |
573 LOG(INFO) << "Not running test on Vista with IE7"; | 573 LOG(INFO) << "Not running test on Vista with IE7"; |
574 return; | 574 return; |
575 } | 575 } |
576 ASSERT_NO_FATAL_FAILURE(DoSaveAsTest(L"link", L"Save link as...", L".zip")); | 576 ASSERT_NO_FATAL_FAILURE(DoSaveAsTest(L"link", L"Save link as...", L".zip")); |
577 } | 577 } |
578 | 578 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 .WillOnce(AccLeftClick(AccObjectMatcher(L"Forward"))); | 966 .WillOnce(AccLeftClick(AccObjectMatcher(L"Forward"))); |
967 | 967 |
968 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(page3))) | 968 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(page3))) |
969 .WillOnce(CloseBrowserMock(&ie_mock_)); | 969 .WillOnce(CloseBrowserMock(&ie_mock_)); |
970 | 970 |
971 LaunchIENavigateAndLoop(page1, | 971 LaunchIENavigateAndLoop(page1, |
972 kChromeFrameVeryLongNavigationTimeoutInSeconds); | 972 kChromeFrameVeryLongNavigationTimeoutInSeconds); |
973 } | 973 } |
974 | 974 |
975 } // namespace chrome_frame_test | 975 } // namespace chrome_frame_test |
OLD | NEW |