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

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: Trim thingie 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 745754593b26a80208319da5f50690af508331e4..72e03a32afb3040f322f4215338e0e048512bf53 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -5521,8 +5521,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);
@@ -5565,8 +5564,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);
@@ -5605,8 +5603,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);
@@ -7215,7 +7212,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());
@@ -7798,7 +7795,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