OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/frame_host/render_frame_host_manager.h" | 5 #include "content/browser/frame_host/render_frame_host_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <tuple> | 9 #include <tuple> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 EXPECT_TRUE(rfh1->render_view_host()->is_waiting_for_close_ack()); | 1729 EXPECT_TRUE(rfh1->render_view_host()->is_waiting_for_close_ack()); |
1730 | 1730 |
1731 // Start a navigation to a new site. | 1731 // Start a navigation to a new site. |
1732 controller().LoadURL( | 1732 controller().LoadURL( |
1733 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); | 1733 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); |
1734 if (IsBrowserSideNavigationEnabled()) | 1734 if (IsBrowserSideNavigationEnabled()) |
1735 rfh1->PrepareForCommit(); | 1735 rfh1->PrepareForCommit(); |
1736 EXPECT_TRUE(contents()->CrossProcessNavigationPending()); | 1736 EXPECT_TRUE(contents()->CrossProcessNavigationPending()); |
1737 | 1737 |
1738 // Simulate the unresponsiveness timer. The tab should close. | 1738 // Simulate the unresponsiveness timer. The tab should close. |
1739 contents()->RendererUnresponsive(rfh1->render_view_host()->GetWidget()); | 1739 contents()->RendererUnresponsive( |
| 1740 rfh1->render_view_host()->GetWidget(), |
| 1741 RenderWidgetHostDelegate::RENDERER_UNRESPONSIVE_CLOSE_PAGE); |
1740 EXPECT_TRUE(close_delegate.is_closed()); | 1742 EXPECT_TRUE(close_delegate.is_closed()); |
1741 } | 1743 } |
1742 | 1744 |
1743 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is | 1745 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is |
1744 // received. (SwapOut and the corresponding ACK always occur after commit.) | 1746 // received. (SwapOut and the corresponding ACK always occur after commit.) |
1745 // Also tests that an early SwapOutACK is properly ignored. | 1747 // Also tests that an early SwapOutACK is properly ignored. |
1746 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { | 1748 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { |
1747 const GURL kUrl1("http://www.google.com/"); | 1749 const GURL kUrl1("http://www.google.com/"); |
1748 const GURL kUrl2("http://www.chromium.org/"); | 1750 const GURL kUrl2("http://www.chromium.org/"); |
1749 | 1751 |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3092 child_host->SendNavigateWithParams(&commit_params); | 3094 child_host->SendNavigateWithParams(&commit_params); |
3093 EXPECT_NO_FATAL_FAILURE(CheckInsecureRequestPolicyIPC( | 3095 EXPECT_NO_FATAL_FAILURE(CheckInsecureRequestPolicyIPC( |
3094 main_test_rfh(), blink::kLeaveInsecureRequestsAlone, | 3096 main_test_rfh(), blink::kLeaveInsecureRequestsAlone, |
3095 proxy_to_parent->GetRoutingID())); | 3097 proxy_to_parent->GetRoutingID())); |
3096 EXPECT_EQ( | 3098 EXPECT_EQ( |
3097 blink::kLeaveInsecureRequestsAlone, | 3099 blink::kLeaveInsecureRequestsAlone, |
3098 root->child_at(0)->current_replication_state().insecure_request_policy); | 3100 root->child_at(0)->current_replication_state().insecure_request_policy); |
3099 } | 3101 } |
3100 | 3102 |
3101 } // namespace content | 3103 } // namespace content |
OLD | NEW |