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 1307013004: Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_unittests compile fix Created 5 years, 1 month 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 863971cbf25505ff6a8bd4600c7d48530453638c..e1d2b5b8891c1a138a015fc46542c5bf6053aab3 100644
--- a/content/browser/frame_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/frame_host/render_frame_host_manager_unittest.cc
@@ -45,6 +45,7 @@
#include "content/test/test_web_contents.h"
#include "net/base/load_flags.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
#include "third_party/WebKit/public/web/WebSandboxFlags.h"
#include "ui/base/page_transition_types.h"
@@ -698,7 +699,7 @@ TEST_F(RenderFrameHostManagerTest, DropCreateChildFrameWhileSwappedOut) {
initial_rfh->OnCreateChildFrame(
initial_rfh->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, std::string(),
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
EXPECT_TRUE(observer.created());
}
@@ -722,7 +723,7 @@ TEST_F(RenderFrameHostManagerTest, DropCreateChildFrameWhileSwappedOut) {
initial_rfh->OnCreateChildFrame(
initial_rfh->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, std::string(),
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
EXPECT_FALSE(observer.created());
}
}
@@ -2096,11 +2097,11 @@ TEST_F(RenderFrameHostManagerTestWithSiteIsolation, DetachPendingChild) {
contents()->GetMainFrame()->OnCreateChildFrame(
contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, "frame_name",
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
contents()->GetMainFrame()->OnCreateChildFrame(
contents()->GetMainFrame()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, "frame_name",
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
RenderFrameHostManager* root_manager =
contents()->GetFrameTree()->root()->render_manager();
RenderFrameHostManager* iframe1 =
@@ -2237,7 +2238,7 @@ TEST_F(RenderFrameHostManagerTestWithSiteIsolation,
contents1->GetMainFrame()->OnCreateChildFrame(
contents1->GetMainFrame()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, "frame_name",
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
RenderFrameHostManager* iframe =
contents()->GetFrameTree()->root()->child_at(0)->render_manager();
NavigationEntryImpl entry(NULL /* instance */, -1 /* page_id */, kUrl2,
@@ -2285,7 +2286,8 @@ TEST_F(RenderFrameHostManagerTestWithSiteIsolation,
EXPECT_TRUE(main_rfh->IsRenderFrameLive());
main_rfh->OnCreateChildFrame(main_rfh->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, std::string(),
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None,
+ blink::WebFrameOwnerProperties());
RenderFrameHostManager* subframe_rfhm =
contents()->GetFrameTree()->root()->child_at(0)->render_manager();
@@ -2443,9 +2445,11 @@ TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) {
FrameTreeNode* root1 = tree1->root();
int process_id = root1->current_frame_host()->GetProcess()->GetID();
tree1->AddFrame(root1, process_id, 12, blink::WebTreeScopeType::Document,
- std::string(), blink::WebSandboxFlags::None);
+ std::string(), blink::WebSandboxFlags::None,
+ blink::WebFrameOwnerProperties());
tree1->AddFrame(root1, process_id, 13, blink::WebTreeScopeType::Document,
- std::string(), blink::WebSandboxFlags::None);
+ std::string(), blink::WebSandboxFlags::None,
+ blink::WebFrameOwnerProperties());
scoped_ptr<TestWebContents> tab2(
TestWebContents::Create(browser_context(), nullptr));
@@ -2453,9 +2457,11 @@ TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) {
FrameTreeNode* root2 = tree2->root();
process_id = root2->current_frame_host()->GetProcess()->GetID();
tree2->AddFrame(root2, process_id, 22, blink::WebTreeScopeType::Document,
- std::string(), blink::WebSandboxFlags::None);
+ std::string(), blink::WebSandboxFlags::None,
+ blink::WebFrameOwnerProperties());
tree2->AddFrame(root2, process_id, 23, blink::WebTreeScopeType::Document,
- std::string(), blink::WebSandboxFlags::None);
+ std::string(), blink::WebSandboxFlags::None,
+ blink::WebFrameOwnerProperties());
scoped_ptr<TestWebContents> tab3(
TestWebContents::Create(browser_context(), nullptr));
@@ -2468,7 +2474,8 @@ TEST_F(RenderFrameHostManagerTest, TraverseComplexOpenerChain) {
FrameTreeNode* root4 = tree4->root();
process_id = root4->current_frame_host()->GetProcess()->GetID();
tree4->AddFrame(root4, process_id, 42, blink::WebTreeScopeType::Document,
- std::string(), blink::WebSandboxFlags::None);
+ std::string(), blink::WebSandboxFlags::None,
+ blink::WebFrameOwnerProperties());
root1->child_at(1)->SetOpener(root1->child_at(1));
root1->SetOpener(root2->child_at(1));
@@ -2517,15 +2524,15 @@ TEST_F(RenderFrameHostManagerTest, PageFocusPropagatesToSubframeProcesses) {
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, "frame1",
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, "frame2",
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, "frame3",
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
FrameTreeNode* root = contents()->GetFrameTree()->root();
RenderFrameHostManager* child1 = root->child_at(0)->render_manager();
@@ -2615,7 +2622,7 @@ TEST_F(RenderFrameHostManagerTest,
main_test_rfh()->OnCreateChildFrame(
main_test_rfh()->GetProcess()->GetNextRoutingID(),
blink::WebTreeScopeType::Document, "frame1",
- blink::WebSandboxFlags::None);
+ blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties());
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_impl.cc ('k') | content/browser/frame_host/render_frame_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698