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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager_unittest.cc

Issue 2155383002: Add an histogram to differentiate between hang types of the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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
OLDNEW
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 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 EXPECT_TRUE(rfh1->render_view_host()->is_waiting_for_close_ack()); 1728 EXPECT_TRUE(rfh1->render_view_host()->is_waiting_for_close_ack());
1729 1729
1730 // Start a navigation to a new site. 1730 // Start a navigation to a new site.
1731 controller().LoadURL( 1731 controller().LoadURL(
1732 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string()); 1732 kUrl2, Referrer(), ui::PAGE_TRANSITION_LINK, std::string());
1733 if (IsBrowserSideNavigationEnabled()) 1733 if (IsBrowserSideNavigationEnabled())
1734 rfh1->PrepareForCommit(); 1734 rfh1->PrepareForCommit();
1735 EXPECT_TRUE(contents()->CrossProcessNavigationPending()); 1735 EXPECT_TRUE(contents()->CrossProcessNavigationPending());
1736 1736
1737 // Simulate the unresponsiveness timer. The tab should close. 1737 // Simulate the unresponsiveness timer. The tab should close.
1738 contents()->RendererUnresponsive(rfh1->render_view_host()->GetWidget()); 1738 contents()->RendererUnresponsive(
1739 rfh1->render_view_host()->GetWidget(),
1740 RenderWidgetHostDelegate::RENDERER_UNRESPONSIVE_CLOSE_PAGE);
1739 EXPECT_TRUE(close_delegate.is_closed()); 1741 EXPECT_TRUE(close_delegate.is_closed());
1740 } 1742 }
1741 1743
1742 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is 1744 // Tests that the RenderFrameHost is properly deleted when the SwapOutACK is
1743 // received. (SwapOut and the corresponding ACK always occur after commit.) 1745 // received. (SwapOut and the corresponding ACK always occur after commit.)
1744 // Also tests that an early SwapOutACK is properly ignored. 1746 // Also tests that an early SwapOutACK is properly ignored.
1745 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) { 1747 TEST_F(RenderFrameHostManagerTest, DeleteFrameAfterSwapOutACK) {
1746 const GURL kUrl1("http://www.google.com/"); 1748 const GURL kUrl1("http://www.google.com/");
1747 const GURL kUrl2("http://www.chromium.org/"); 1749 const GURL kUrl2("http://www.chromium.org/");
1748 1750
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
3091 child_host->SendNavigateWithParams(&commit_params); 3093 child_host->SendNavigateWithParams(&commit_params);
3092 EXPECT_NO_FATAL_FAILURE(CheckInsecureRequestPolicyIPC( 3094 EXPECT_NO_FATAL_FAILURE(CheckInsecureRequestPolicyIPC(
3093 main_test_rfh(), blink::kLeaveInsecureRequestsAlone, 3095 main_test_rfh(), blink::kLeaveInsecureRequestsAlone,
3094 proxy_to_parent->GetRoutingID())); 3096 proxy_to_parent->GetRoutingID()));
3095 EXPECT_EQ( 3097 EXPECT_EQ(
3096 blink::kLeaveInsecureRequestsAlone, 3098 blink::kLeaveInsecureRequestsAlone,
3097 root->child_at(0)->current_replication_state().insecure_request_policy); 3099 root->child_at(0)->current_replication_state().insecure_request_policy);
3098 } 3100 }
3099 3101
3100 } // namespace content 3102 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698