Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <mshtmcid.h> | 5 #include <mshtmcid.h> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/test/test_file_util.h" | 10 #include "base/test/test_file_util.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 context_menu_page_title = L"context menu"; | 463 context_menu_page_title = L"context menu"; |
| 464 // Clear clipboard to make sure there is no effect from previous tests. | 464 // Clear clipboard to make sure there is no effect from previous tests. |
| 465 SetClipboardText(L""); | 465 SetClipboardText(L""); |
| 466 // These are UI-related tests, so we do not care about the exact | 466 // These are UI-related tests, so we do not care about the exact |
| 467 // navigations that occur. | 467 // navigations that occur. |
| 468 ie_mock_.ExpectAnyNavigations(); | 468 ie_mock_.ExpectAnyNavigations(); |
| 469 EXPECT_CALL(ie_mock_, OnLoad(_, _)).Times(testing::AnyNumber()); | 469 EXPECT_CALL(ie_mock_, OnLoad(_, _)).Times(testing::AnyNumber()); |
| 470 EXPECT_CALL(acc_observer_, OnAccDocLoad(_)).Times(testing::AnyNumber()); | 470 EXPECT_CALL(acc_observer_, OnAccDocLoad(_)).Times(testing::AnyNumber()); |
| 471 } | 471 } |
| 472 | 472 |
| 473 virtual void TearDown() { | |
| 474 // Destory the clipboard here because it is not destroyed automatically. | |
|
Nico
2013/07/10 16:48:20
typo Destory
alexeypa (please no reviews)
2013/07/10 19:24:45
Done.
| |
| 475 DestroyClipboard(); | |
| 476 } | |
| 477 | |
| 473 // Common helper function for "Save xxx As" tests. | 478 // Common helper function for "Save xxx As" tests. |
| 474 void DoSaveAsTest(const wchar_t* role, const wchar_t* menu_item_name, | 479 void DoSaveAsTest(const wchar_t* role, const wchar_t* menu_item_name, |
| 475 const wchar_t* file_ext) { | 480 const wchar_t* file_ext) { |
| 476 server_mock_.ExpectAndServeAnyRequests(CFInvocation::MetaTag()); | 481 server_mock_.ExpectAndServeAnyRequests(CFInvocation::MetaTag()); |
| 477 MockWindowObserver win_observer_mock; | 482 MockWindowObserver win_observer_mock; |
| 478 InSequence expect_in_sequence_for_scope; | 483 InSequence expect_in_sequence_for_scope; |
| 479 | 484 |
| 480 // Open 'Save As' dialog. | 485 // Open 'Save As' dialog. |
| 481 const char* kSaveDlgCaption = "Save As"; | 486 const char* kSaveDlgCaption = "Save As"; |
| 482 EXPECT_CALL(acc_observer_, | 487 EXPECT_CALL(acc_observer_, |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1075 EXPECT_CALL(acc_observer_, OnMenuPopup(_)) | 1080 EXPECT_CALL(acc_observer_, OnMenuPopup(_)) |
| 1076 .WillOnce(AccLeftClick(AccObjectMatcher(L"Forward"))); | 1081 .WillOnce(AccLeftClick(AccObjectMatcher(L"Forward"))); |
| 1077 | 1082 |
| 1078 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(page3))) | 1083 EXPECT_CALL(ie_mock_, OnLoad(IN_CF, StrEq(page3))) |
| 1079 .WillOnce(CloseBrowserMock(&ie_mock_)); | 1084 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 1080 | 1085 |
| 1081 LaunchIENavigateAndLoop(page1, kChromeFrameVeryLongNavigationTimeout); | 1086 LaunchIENavigateAndLoop(page1, kChromeFrameVeryLongNavigationTimeout); |
| 1082 } | 1087 } |
| 1083 | 1088 |
| 1084 } // namespace chrome_frame_test | 1089 } // namespace chrome_frame_test |
| OLD | NEW |