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

Unified Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
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 41c5d4ceca6bb00dd13deb53123347df96b8b7f9..7829b22b1131a0447016beca163787d67e2fbb4b 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -5541,8 +5541,7 @@ TEST_P(ParameterizedWebFrameTest, DidAccessInitialDocumentBody)
// Create another window that will try to access it.
FrameTestHelpers::WebViewHelper newWebViewHelper(this);
- WebView* newView = newWebViewHelper.initialize(true);
- newView->mainFrame()->setOpener(webViewHelper.webView()->mainFrame());
+ WebView* newView = newWebViewHelper.initializeWithOpener(webViewHelper.webView()->mainFrame(), true);
runPendingTasks();
EXPECT_FALSE(webFrameClient.m_didAccessInitialDocument);
@@ -5573,8 +5572,7 @@ TEST_P(ParameterizedWebFrameTest, DidAccessInitialDocumentNavigator)
// Create another window that will try to access it.
FrameTestHelpers::WebViewHelper newWebViewHelper(this);
- WebView* newView = newWebViewHelper.initialize(true);
- newView->mainFrame()->setOpener(webViewHelper.webView()->mainFrame());
+ WebView* newView = newWebViewHelper.initializeWithOpener(webViewHelper.webView()->mainFrame(), true);
runPendingTasks();
EXPECT_FALSE(webFrameClient.m_didAccessInitialDocument);
@@ -5617,8 +5615,7 @@ TEST_P(ParameterizedWebFrameTest, DidAccessInitialDocumentBodyBeforeModalDialog)
// Create another window that will try to access it.
FrameTestHelpers::WebViewHelper newWebViewHelper(this);
- WebView* newView = newWebViewHelper.initialize(true);
- newView->mainFrame()->setOpener(webViewHelper.webView()->mainFrame());
+ WebView* newView = newWebViewHelper.initializeWithOpener(webViewHelper.webView()->mainFrame(), true);
runPendingTasks();
EXPECT_FALSE(webFrameClient.m_didAccessInitialDocument);
@@ -5657,8 +5654,7 @@ TEST_P(ParameterizedWebFrameTest, DidWriteToInitialDocumentBeforeModalDialog)
// Create another window that will try to access it.
FrameTestHelpers::WebViewHelper newWebViewHelper(this);
- WebView* newView = newWebViewHelper.initialize(true);
- newView->mainFrame()->setOpener(webViewHelper.webView()->mainFrame());
+ WebView* newView = newWebViewHelper.initializeWithOpener(webViewHelper.webView()->mainFrame(), true);
runPendingTasks();
EXPECT_FALSE(webFrameClient.m_didAccessInitialDocument);
@@ -7276,7 +7272,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, "", "uniqueName0", WebSandboxFlags::None, &remoteFrameClient2);
+ WebRemoteFrame* childRemoteFrame = FrameTestHelpers::createRemoteChild(remoteFrame, &remoteFrameClient2);
FrameTestHelpers::TestWebFrameClient client;
WebLocalFrame* localFrame = WebLocalFrame::createProvisional(&client, remoteFrame, WebSandboxFlags::None, WebFrameOwnerProperties());
@@ -7859,7 +7855,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, "", "uniqueName1", WebSandboxFlags::None, &childFrameClient);
+ WebRemoteFrame* childFrame = FrameTestHelpers::createRemoteChild(view->mainFrame()->toWebRemoteFrame(), &childFrameClient);
childFrame->detach();
view->close();
childFrame->close();

Powered by Google App Engine
This is Rietveld 408576698