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

Side by Side Diff: content/browser/web_contents/test_web_contents.cc

Issue 10907182: Add UMA counter for hung renderers on cross-site navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
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 "content/browser/web_contents/test_web_contents.h" 5 #include "content/browser/web_contents/test_web_contents.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "content/browser/browser_url_handler_impl.h" 9 #include "content/browser/browser_url_handler_impl.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 int page_id = entry->GetPageID(); 143 int page_id = entry->GetPageID();
144 if (page_id == -1) { 144 if (page_id == -1) {
145 // It's a new navigation, assign a never-seen page id to it. 145 // It's a new navigation, assign a never-seen page id to it.
146 page_id = GetMaxPageIDForSiteInstance(rvh->GetSiteInstance()) + 1; 146 page_id = GetMaxPageIDForSiteInstance(rvh->GetSiteInstance()) + 1;
147 } 147 }
148 rvh->SendNavigate(page_id, entry->GetURL()); 148 rvh->SendNavigate(page_id, entry->GetURL());
149 149
150 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation 150 // Simulate the SwapOut_ACK that fires if you commit a cross-site navigation
151 // without making any network requests. 151 // without making any network requests.
152 if (old_rvh != rvh) 152 if (old_rvh != rvh)
153 static_cast<RenderViewHostImpl*>(old_rvh)->OnSwapOutACK(); 153 static_cast<RenderViewHostImpl*>(old_rvh)->OnSwapOutACK(false);
154 } 154 }
155 155
156 int TestWebContents::GetNumberOfFocusCalls() { 156 int TestWebContents::GetNumberOfFocusCalls() {
157 NOTREACHED(); 157 NOTREACHED();
158 return 0; 158 return 0;
159 } 159 }
160 160
161 void TestWebContents::ProceedWithCrossSiteNavigation() { 161 void TestWebContents::ProceedWithCrossSiteNavigation() {
162 if (!GetPendingRenderViewHost()) 162 if (!GetPendingRenderViewHost())
163 return; 163 return;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 void TestWebContents::ShowCreatedWidget(int route_id, 224 void TestWebContents::ShowCreatedWidget(int route_id,
225 const gfx::Rect& initial_pos) { 225 const gfx::Rect& initial_pos) {
226 } 226 }
227 227
228 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) { 228 void TestWebContents::ShowCreatedFullscreenWidget(int route_id) {
229 } 229 }
230 230
231 } // namespace content 231 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698