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

Unified Diff: content/browser/frame_host/render_frame_host_manager_unittest.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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager_unittest.cc
diff --git a/content/browser/frame_host/render_frame_host_manager_unittest.cc b/content/browser/frame_host/render_frame_host_manager_unittest.cc
index 8d188345ae68cd88f633f10dcdf4e55c603472af..a250dae3376ffa69e62f0918beaf733c5410e248 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -1946,11 +1946,13 @@ TEST_F(RenderFrameHostManagerTestWithSiteIsolation, DetachPendingChild) {
contents()->GetMainFrame()->OnCreateChildFrame(
contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame_name", "uniqueName1",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
contents()->GetMainFrame()->OnCreateChildFrame(
contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame_name", "uniqueName2",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
RenderFrameHostManager* root_manager =
contents()->GetFrameTree()->root()->render_manager();
RenderFrameHostManager* iframe1 =
@@ -2085,7 +2087,8 @@ TEST_F(RenderFrameHostManagerTestWithSiteIsolation,
contents1->GetMainFrame()->OnCreateChildFrame(
contents1->GetMainFrame()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame_name", "uniqueName1",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
RenderFrameHostManager* iframe =
contents()->GetFrameTree()->root()->child_at(0)->render_manager();
NavigationEntryImpl entry(NULL /* instance */, kUrl2,
@@ -2134,7 +2137,8 @@ TEST_F(RenderFrameHostManagerTestWithSiteIsolation,
main_rfh->OnCreateChildFrame(
main_rfh->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, std::string(), "uniqueName1",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
RenderFrameHostManager* subframe_rfhm =
contents()->GetFrameTree()->root()->child_at(0)->render_manager();
@@ -2292,10 +2296,10 @@ TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) {
int process_id = root1->current_frame_host()->GetProcess()->GetID();
tree1->AddFrame(root1, process_id, 12, blink::WebTreeScopeType::kDocument,
std::string(), "uniqueName0", blink::WebSandboxFlags::kNone,
- FrameOwnerProperties());
+ ParsedFeaturePolicyHeader(), FrameOwnerProperties());
tree1->AddFrame(root1, process_id, 13, blink::WebTreeScopeType::kDocument,
std::string(), "uniqueName1", blink::WebSandboxFlags::kNone,
- FrameOwnerProperties());
+ ParsedFeaturePolicyHeader(), FrameOwnerProperties());
std::unique_ptr<TestWebContents> tab2(
TestWebContents::Create(browser_context(), nullptr));
@@ -2305,10 +2309,10 @@ TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) {
process_id = root2->current_frame_host()->GetProcess()->GetID();
tree2->AddFrame(root2, process_id, 22, blink::WebTreeScopeType::kDocument,
std::string(), "uniqueName2", blink::WebSandboxFlags::kNone,
- FrameOwnerProperties());
+ ParsedFeaturePolicyHeader(), FrameOwnerProperties());
tree2->AddFrame(root2, process_id, 23, blink::WebTreeScopeType::kDocument,
std::string(), "uniqueName3", blink::WebSandboxFlags::kNone,
- FrameOwnerProperties());
+ ParsedFeaturePolicyHeader(), FrameOwnerProperties());
std::unique_ptr<TestWebContents> tab3(
TestWebContents::Create(browser_context(), nullptr));
@@ -2323,7 +2327,7 @@ TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) {
process_id = root4->current_frame_host()->GetProcess()->GetID();
tree4->AddFrame(root4, process_id, 42, blink::WebTreeScopeType::kDocument,
std::string(), "uniqueName4", blink::WebSandboxFlags::kNone,
- FrameOwnerProperties());
+ ParsedFeaturePolicyHeader(), FrameOwnerProperties());
root1->child_at(1)->SetOpener(root1->child_at(1));
root1->SetOpener(root2->child_at(1));
@@ -2372,15 +2376,18 @@ TEST_F(RenderFrameHostManagerTest, PageFocusPropagatesToSubframeProcesses) {
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame1", "uniqueName1",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame2", "uniqueName2",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame3", "uniqueName3",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
FrameTreeNode* root = contents()->GetFrameTree()->root();
RenderFrameHostManager* child1 = root->child_at(0)->render_manager();
@@ -2470,7 +2477,8 @@ TEST_F(RenderFrameHostManagerTest,
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame1", "uniqueName1",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
FrameTreeNode* root = contents()->GetFrameTree()->root();
RenderFrameHostManager* child = root->child_at(0)->render_manager();
@@ -3014,7 +3022,8 @@ TEST_F(RenderFrameHostManagerTestWithSiteIsolation,
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::kDocument, "frame1", "uniqueName1",
- blink::WebSandboxFlags::kNone, FrameOwnerProperties());
+ blink::WebSandboxFlags::kNone, ParsedFeaturePolicyHeader(),
+ FrameOwnerProperties());
FrameTreeNode* root = contents()->GetFrameTree()->root();
RenderFrameHostManager* child = root->child_at(0)->render_manager();
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/frame_host/render_frame_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698