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

Side by Side Diff: content/test/test_render_frame_host.cc

Issue 1572743002: Make sure bubbles in Views default to close before their RenderFrameHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Move DCHECK string into longer comment Created 4 years, 10 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
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/test_render_frame_host.h" 5 #include "content/test/test_render_frame_host.h"
6 6
7 #include "content/browser/frame_host/frame_tree.h" 7 #include "content/browser/frame_host/frame_tree.h"
8 #include "content/browser/frame_host/navigation_handle_impl.h" 8 #include "content/browser/frame_host/navigation_handle_impl.h"
9 #include "content/browser/frame_host/navigation_request.h" 9 #include "content/browser/frame_host/navigation_request.h"
10 #include "content/browser/frame_host/navigator.h" 10 #include "content/browser/frame_host/navigator.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 TestRenderFrameHost* TestRenderFrameHost::AppendChild( 83 TestRenderFrameHost* TestRenderFrameHost::AppendChild(
84 const std::string& frame_name) { 84 const std::string& frame_name) {
85 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), 85 OnCreateChildFrame(GetProcess()->GetNextRoutingID(),
86 blink::WebTreeScopeType::Document, frame_name, 86 blink::WebTreeScopeType::Document, frame_name,
87 blink::WebSandboxFlags::None, 87 blink::WebSandboxFlags::None,
88 blink::WebFrameOwnerProperties()); 88 blink::WebFrameOwnerProperties());
89 return static_cast<TestRenderFrameHost*>( 89 return static_cast<TestRenderFrameHost*>(
90 child_creation_observer_.last_created_frame()); 90 child_creation_observer_.last_created_frame());
91 } 91 }
92 92
93 void TestRenderFrameHost::Detach() {
94 OnDetach();
95 }
96
93 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) { 97 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) {
94 if (IsBrowserSideNavigationEnabled()) { 98 if (IsBrowserSideNavigationEnabled()) {
95 SendRendererInitiatedNavigationRequest(url, false); 99 SendRendererInitiatedNavigationRequest(url, false);
96 return; 100 return;
97 } 101 }
98 102
99 OnDidStartLoading(true); 103 OnDidStartLoading(true);
100 OnDidStartProvisionalLoad(url, base::TimeTicks::Now()); 104 OnDidStartProvisionalLoad(url, base::TimeTicks::Now());
101 } 105 }
102 106
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 // cleared during DidFailProvisionalLoad). 413 // cleared during DidFailProvisionalLoad).
410 int page_id = entry ? entry->GetPageID() : -1; 414 int page_id = entry ? entry->GetPageID() : -1;
411 if (page_id == -1) { 415 if (page_id == -1) {
412 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate()); 416 WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(delegate());
413 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1; 417 page_id = web_contents->GetMaxPageIDForSiteInstance(GetSiteInstance()) + 1;
414 } 418 }
415 return page_id; 419 return page_id;
416 } 420 }
417 421
418 } // namespace content 422 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_render_frame_host.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698