| Index: third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| index 71d4484b9a7d5cf3917e78987e4f002efce66421..3d22d75833131d11fc6332b955f6ea7d66bbd868 100644
|
| --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
| @@ -1581,7 +1581,7 @@ TEST_F(WebFrameTest, FrameOwnerPropertiesMargin)
|
| properties.marginWidth = 11;
|
| properties.marginHeight = 22;
|
| FrameTestHelpers::TestWebFrameClient localFrameClient;
|
| - WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &localFrameClient, nullptr, properties);
|
| + WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &localFrameClient, nullptr, properties);
|
|
|
| registerMockedHttpURLLoad("frame_owner_properties.html");
|
| FrameTestHelpers::loadFrame(localFrame, m_baseURL + "frame_owner_properties.html");
|
| @@ -1614,7 +1614,7 @@ TEST_F(WebFrameTest, FrameOwnerPropertiesScrolling)
|
| // Turn off scrolling in the subframe.
|
| properties.scrollingMode = WebFrameOwnerProperties::ScrollingMode::AlwaysOff;
|
| FrameTestHelpers::TestWebFrameClient localFrameClient;
|
| - WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &localFrameClient, nullptr, properties);
|
| + WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &localFrameClient, nullptr, properties);
|
|
|
| registerMockedHttpURLLoad("frame_owner_properties.html");
|
| FrameTestHelpers::loadFrame(localFrame, m_baseURL + "frame_owner_properties.html");
|
| @@ -5886,7 +5886,7 @@ public:
|
| int willSendRequestCallCount() const { return m_willSendRequestCallCount; }
|
| int childFrameCreationCount() const { return m_childFrameCreationCount; }
|
|
|
| - virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType scope, const WebString&, WebSandboxFlags, const WebFrameOwnerProperties& frameOwnerProperties)
|
| + virtual WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType scope, const WebString&, const WebString&, WebSandboxFlags, const WebFrameOwnerProperties& frameOwnerProperties)
|
| {
|
| ASSERT(m_childClient);
|
| m_childFrameCreationCount++;
|
| @@ -6275,7 +6275,7 @@ class FailCreateChildFrame : public FrameTestHelpers::TestWebFrameClient {
|
| public:
|
| FailCreateChildFrame() : m_callCount(0) { }
|
|
|
| - WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType scope, const WebString& frameName, WebSandboxFlags sandboxFlags, const WebFrameOwnerProperties& frameOwnerProperties) override
|
| + WebFrame* createChildFrame(WebLocalFrame* parent, WebTreeScopeType scope, const WebString& frameName, const WebString& frameUniqueName, WebSandboxFlags sandboxFlags, const WebFrameOwnerProperties& frameOwnerProperties) override
|
| {
|
| ++m_callCount;
|
| return 0;
|
| @@ -6934,7 +6934,7 @@ TEST_P(ParameterizedWebFrameTest, EmbedderTriggeredDetachWithRemoteMainFrame)
|
| WebView* view = WebView::create(&viewClient);
|
| view->setMainFrame(remoteClient.frame());
|
| FrameTestHelpers::TestWebFrameClient childFrameClient;
|
| - WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
|
|
| // Purposely keep the LocalFrame alive so it's the last thing to be destroyed.
|
| RefPtrWillBePersistent<Frame> childCoreFrame = childFrame->toImplBase()->frame();
|
| @@ -7182,7 +7182,7 @@ TEST_F(WebFrameSwapTest, SwapParentShouldDetachChildren)
|
|
|
| // Create child frames in the target frame before testing the swap.
|
| FrameTestHelpers::TestWebRemoteFrameClient remoteFrameClient2;
|
| - WebRemoteFrame* childRemoteFrame = remoteFrame->createRemoteChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &remoteFrameClient2);
|
| + WebRemoteFrame* childRemoteFrame = remoteFrame->createRemoteChild(WebTreeScopeType::Document, "", "uniqueName0", WebSandboxFlags::None, &remoteFrameClient2);
|
|
|
| FrameTestHelpers::TestWebFrameClient client;
|
| WebLocalFrame* localFrame = WebLocalFrame::createProvisional(&client, remoteFrame, WebSandboxFlags::None, WebFrameOwnerProperties());
|
| @@ -7332,7 +7332,7 @@ TEST_F(WebFrameSwapTest, FramesOfRemoteParentAreIndexable)
|
| remoteParentFrame->setReplicatedOrigin(SecurityOrigin::createUnique());
|
|
|
| FrameTestHelpers::TestWebFrameClient childFrameClient;
|
| - WebLocalFrame* childFrame = remoteParentFrame->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrame* childFrame = remoteParentFrame->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| FrameTestHelpers::loadFrame(childFrame, m_baseURL + "subframe-hello.html");
|
|
|
| v8::Local<v8::Value> window = childFrame->executeScriptAndReturnValue(WebScriptSource("window"));
|
| @@ -7359,7 +7359,7 @@ TEST_F(WebFrameSwapTest, FrameElementInFramesWithRemoteParent)
|
| remoteParentFrame->setReplicatedOrigin(SecurityOrigin::createUnique());
|
|
|
| FrameTestHelpers::TestWebFrameClient childFrameClient;
|
| - WebLocalFrame* childFrame = remoteParentFrame->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrame* childFrame = remoteParentFrame->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| FrameTestHelpers::loadFrame(childFrame, m_baseURL + "subframe-hello.html");
|
|
|
| v8::Local<v8::Value> frameElement = childFrame->executeScriptAndReturnValue(WebScriptSource("window.frameElement"));
|
| @@ -7676,7 +7676,7 @@ TEST_P(ParameterizedWebFrameTest, RemoteFrameInitialCommitType)
|
|
|
| // If an iframe has a remote main frame, ensure the inital commit is correctly identified as WebInitialCommitInChildFrame.
|
| CommitTypeWebFrameClient childFrameClient;
|
| - WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| registerMockedHttpURLLoad("foo.html");
|
| FrameTestHelpers::loadFrame(childFrame, m_baseURL + "foo.html");
|
| EXPECT_EQ(WebInitialCommitInChildFrame, childFrameClient.historyCommitType());
|
| @@ -7702,7 +7702,7 @@ TEST_P(ParameterizedWebFrameTest, FrameWidgetTest)
|
| view->setMainFrame(remoteClient.frame());
|
|
|
| FrameTestHelpers::TestWebFrameClient childFrameClient;
|
| - WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &childFrameClient, nullptr, WebFrameOwnerProperties());
|
|
|
| GestureEventTestWebViewClient childViewClient;
|
| WebFrameWidget* widget = WebFrameWidget::create(&childViewClient, childFrame);
|
| @@ -7768,7 +7768,7 @@ TEST_P(ParameterizedWebFrameTest, DetachRemoteFrame)
|
| WebView* view = WebView::create(&viewClient);
|
| view->setMainFrame(remoteClient.frame());
|
| FrameTestHelpers::TestWebRemoteFrameClient childFrameClient;
|
| - WebRemoteFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createRemoteChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &childFrameClient);
|
| + WebRemoteFrame* childFrame = view->mainFrame()->toWebRemoteFrame()->createRemoteChild(WebTreeScopeType::Document, "", "uniqueName1", WebSandboxFlags::None, &childFrameClient);
|
| childFrame->detach();
|
| view->close();
|
| childFrame->close();
|
| @@ -7920,10 +7920,10 @@ TEST_P(ParameterizedWebFrameTest, CreateLocalChildWithPreviousSibling)
|
| view->setMainFrame(remoteClient.frame());
|
| WebRemoteFrame* parent = view->mainFrame()->toWebRemoteFrame();
|
|
|
| - WebLocalFrameScope secondFrame = parent->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, nullptr, nullptr, WebFrameOwnerProperties());
|
| - WebLocalFrameScope fourthFrame = parent->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, nullptr, secondFrame, WebFrameOwnerProperties());
|
| - WebLocalFrameScope thirdFrame = parent->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, nullptr, secondFrame, WebFrameOwnerProperties());
|
| - WebLocalFrameScope firstFrame = parent->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, nullptr, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrameScope secondFrame = parent->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, nullptr, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrameScope fourthFrame = parent->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, nullptr, secondFrame, WebFrameOwnerProperties());
|
| + WebLocalFrameScope thirdFrame = parent->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, nullptr, secondFrame, WebFrameOwnerProperties());
|
| + WebLocalFrameScope firstFrame = parent->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, nullptr, nullptr, WebFrameOwnerProperties());
|
|
|
| EXPECT_EQ(firstFrame, parent->firstChild());
|
| EXPECT_EQ(nullptr, firstFrame->previousSibling());
|
| @@ -7958,7 +7958,7 @@ TEST_P(ParameterizedWebFrameTest, SendBeaconFromChildWithRemoteMainFrame)
|
| root->setReplicatedOrigin(SecurityOrigin::createUnique());
|
|
|
| FrameTestHelpers::TestWebFrameClient localFrameClient;
|
| - WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &localFrameClient, nullptr, WebFrameOwnerProperties());
|
| + WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &localFrameClient, nullptr, WebFrameOwnerProperties());
|
|
|
| // Finally, make sure an embedder triggered load in the local frame swapped
|
| // back in works.
|
| @@ -7980,7 +7980,7 @@ TEST_P(ParameterizedWebFrameTest, RemoteToLocalSwapOnMainFrameInitializesCoreFra
|
| remoteRoot->setReplicatedOrigin(SecurityOrigin::createUnique());
|
|
|
| FrameTestHelpers::TestWebFrameClient localFrameClient;
|
| - remoteRoot->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &localFrameClient, nullptr, WebFrameOwnerProperties());
|
| + remoteRoot->createLocalChild(WebTreeScopeType::Document, "", "", WebSandboxFlags::None, &localFrameClient, nullptr, WebFrameOwnerProperties());
|
|
|
| // Do a remote-to-local swap of the top frame.
|
| FrameTestHelpers::TestWebFrameClient localClient;
|
|
|