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

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

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Addressing review comments Created 3 years, 8 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/renderer/render_frame_proxy.cc ('k') | third_party/WebKit/Source/core/dom/Document.h » ('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 "base/guid.h" 7 #include "base/guid.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/frame_host/frame_tree.h" 9 #include "content/browser/frame_host/frame_tree.h"
10 #include "content/browser/frame_host/navigation_handle_impl.h" 10 #include "content/browser/frame_host/navigation_handle_impl.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, false); 90 base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, false);
91 } 91 }
92 } 92 }
93 93
94 TestRenderFrameHost* TestRenderFrameHost::AppendChild( 94 TestRenderFrameHost* TestRenderFrameHost::AppendChild(
95 const std::string& frame_name) { 95 const std::string& frame_name) {
96 std::string frame_unique_name = base::GenerateGUID(); 96 std::string frame_unique_name = base::GenerateGUID();
97 OnCreateChildFrame(GetProcess()->GetNextRoutingID(), 97 OnCreateChildFrame(GetProcess()->GetNextRoutingID(),
98 blink::WebTreeScopeType::kDocument, frame_name, 98 blink::WebTreeScopeType::kDocument, frame_name,
99 frame_unique_name, blink::WebSandboxFlags::kNone, 99 frame_unique_name, blink::WebSandboxFlags::kNone,
100 FrameOwnerProperties()); 100 ParsedFeaturePolicyHeader(), FrameOwnerProperties());
101 return static_cast<TestRenderFrameHost*>( 101 return static_cast<TestRenderFrameHost*>(
102 child_creation_observer_.last_created_frame()); 102 child_creation_observer_.last_created_frame());
103 } 103 }
104 104
105 void TestRenderFrameHost::Detach() { 105 void TestRenderFrameHost::Detach() {
106 OnDetach(); 106 OnDetach();
107 } 107 }
108 108
109 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) { 109 void TestRenderFrameHost::SimulateNavigationStart(const GURL& url) {
110 if (IsBrowserSideNavigationEnabled()) { 110 if (IsBrowserSideNavigationEnabled()) {
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at 520 // PlzNavigate: NavigationHandle::WillStartRequest has already been called at
521 // this point. 521 // this point.
522 if (!navigation_handle() || IsBrowserSideNavigationEnabled()) 522 if (!navigation_handle() || IsBrowserSideNavigationEnabled())
523 return; 523 return;
524 navigation_handle()->CallWillStartRequestForTesting( 524 navigation_handle()->CallWillStartRequestForTesting(
525 false /* is_post */, Referrer(GURL(), blink::kWebReferrerPolicyDefault), 525 false /* is_post */, Referrer(GURL(), blink::kWebReferrerPolicyDefault),
526 true /* user_gesture */, transition, false /* is_external_protocol */); 526 true /* user_gesture */, transition, false /* is_external_protocol */);
527 } 527 }
528 528
529 } // namespace content 529 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_proxy.cc ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698