| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/scoped_comptr_win.h" | 7 #include "base/scoped_comptr_win.h" |
| 8 #include "base/win_util.h" | 8 #include "base/win_util.h" |
| 9 #include "chrome_frame/test/chrome_frame_test_utils.h" | 9 #include "chrome_frame/test/chrome_frame_test_utils.h" |
| 10 #include "chrome_frame/test/mock_ie_event_sink_actions.h" | 10 #include "chrome_frame/test/mock_ie_event_sink_actions.h" |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 VerifyAddressBarUrl(&ie_mock_), | 669 VerifyAddressBarUrl(&ie_mock_), |
| 670 DelayGoForward(&ie_mock_, &loop_, 0))); | 670 DelayGoForward(&ie_mock_, &loop_, 0))); |
| 671 | 671 |
| 672 ie_mock_.ExpectNavigation(in_cf, kFormPostActionUrl); | 672 ie_mock_.ExpectNavigation(in_cf, kFormPostActionUrl); |
| 673 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostActionUrl))) | 673 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kFormPostActionUrl))) |
| 674 .WillOnce(CloseBrowserMock(&ie_mock_)); | 674 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 675 | 675 |
| 676 LaunchIEAndNavigate(kFormPostUrl); | 676 LaunchIEAndNavigate(kFormPostUrl); |
| 677 } | 677 } |
| 678 | 678 |
| 679 TEST_P(FullTabNavigationTest, CF_UnloadEventTest) { |
| 680 bool in_cf = GetParam().invokes_cf(); |
| 681 if (!in_cf) { |
| 682 LOG(ERROR) << "Test not yet implemented."; |
| 683 return; |
| 684 } |
| 685 |
| 686 std::wstring kUnloadEventTestUrl = |
| 687 GetTestUrl(L"fulltab_before_unload_event_test.html"); |
| 688 |
| 689 std::wstring kUnloadEventMainUrl = |
| 690 GetTestUrl(L"fulltab_before_unload_event_main.html"); |
| 691 |
| 692 server_mock_.ExpectAndServeAnyRequests(GetParam()); |
| 693 InSequence expect_in_sequence_for_scope; |
| 694 |
| 695 ie_mock_.ExpectNavigation(in_cf, kUnloadEventTestUrl); |
| 696 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kUnloadEventTestUrl))); |
| 697 |
| 698 ie_mock_.ExpectNavigation(in_cf, kUnloadEventMainUrl); |
| 699 EXPECT_CALL(ie_mock_, OnLoad(in_cf, StrEq(kUnloadEventMainUrl))); |
| 700 |
| 701 EXPECT_CALL(ie_mock_, OnMessage(_, _, _)) |
| 702 .WillOnce(CloseBrowserMock(&ie_mock_)); |
| 703 |
| 704 LaunchIEAndNavigate(kUnloadEventTestUrl); |
| 705 } |
| 706 |
| 679 } // namespace chrome_frame_test | 707 } // namespace chrome_frame_test |
| 680 | 708 |
| OLD | NEW |