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

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

Issue 948143002: Remove unused WebFrame::swap() path for local frames. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nullptr Created 5 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
« Source/web/WebLocalFrameImpl.cpp ('K') | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index c86e9b257b1c22a6725de392d9e2b378b4224167..844c1272a7d2dc75c0dc1ca0cc3c5fed26b4bc79 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -6863,11 +6863,12 @@ private:
TEST_F(WebFrameSwapTest, SwapMainFrame)
{
- WebFrame* remoteFrame = WebRemoteFrame::create(0);
+ WebRemoteFrame* remoteFrame = WebRemoteFrame::create(nullptr);
mainFrame()->swap(remoteFrame);
FrameTestHelpers::TestWebFrameClient client;
- WebFrame* localFrame = WebLocalFrame::create(&client);
+ WebLocalFrame* localFrame = WebLocalFrame::create(&client);
+ localFrame->initializeToReplaceRemoteFrame(remoteFrame);
remoteFrame->swap(localFrame);
// Finally, make sure an embedder triggered load in the local frame swapped
@@ -6895,11 +6896,12 @@ void swapAndVerifyFirstChildConsistency(const char* const message, WebFrame* par
TEST_F(WebFrameSwapTest, SwapFirstChild)
{
- WebFrame* remoteFrame = WebRemoteFrame::create(0);
+ WebRemoteFrame* remoteFrame = WebRemoteFrame::create(nullptr);
swapAndVerifyFirstChildConsistency("local->remote", mainFrame(), remoteFrame);
FrameTestHelpers::TestWebFrameClient client;
- WebFrame* localFrame = WebLocalFrame::create(&client);
+ WebLocalFrame* localFrame = WebLocalFrame::create(&client);
+ localFrame->initializeToReplaceRemoteFrame(remoteFrame);
swapAndVerifyFirstChildConsistency("remote->local", mainFrame(), localFrame);
// FIXME: This almost certainly fires more load events on the iframe element
@@ -6932,11 +6934,12 @@ void swapAndVerifyMiddleChildConsistency(const char* const message, WebFrame* pa
TEST_F(WebFrameSwapTest, SwapMiddleChild)
{
- WebFrame* remoteFrame = WebRemoteFrame::create(0);
+ WebRemoteFrame* remoteFrame = WebRemoteFrame::create(nullptr);
swapAndVerifyMiddleChildConsistency("local->remote", mainFrame(), remoteFrame);
FrameTestHelpers::TestWebFrameClient client;
- WebFrame* localFrame = WebLocalFrame::create(&client);
+ WebLocalFrame* localFrame = WebLocalFrame::create(&client);
+ localFrame->initializeToReplaceRemoteFrame(remoteFrame);
swapAndVerifyMiddleChildConsistency("remote->local", mainFrame(), localFrame);
// FIXME: This almost certainly fires more load events on the iframe element
@@ -6966,11 +6969,12 @@ void swapAndVerifyLastChildConsistency(const char* const message, WebFrame* pare
TEST_F(WebFrameSwapTest, SwapLastChild)
{
- WebFrame* remoteFrame = WebRemoteFrame::create(0);
+ WebRemoteFrame* remoteFrame = WebRemoteFrame::create(nullptr);
swapAndVerifyLastChildConsistency("local->remote", mainFrame(), remoteFrame);
FrameTestHelpers::TestWebFrameClient client;
- WebFrame* localFrame = WebLocalFrame::create(&client);
+ WebLocalFrame* localFrame = WebLocalFrame::create(&client);
+ localFrame->initializeToReplaceRemoteFrame(remoteFrame);
swapAndVerifyLastChildConsistency("remote->local", mainFrame(), localFrame);
// FIXME: This almost certainly fires more load events on the iframe element
@@ -7013,7 +7017,8 @@ TEST_F(WebFrameSwapTest, SwapParentShouldDetachChildren)
remoteFrame->createRemoteChild("", WebSandboxFlags::None, &remoteFrameClient);
FrameTestHelpers::TestWebFrameClient client;
- WebFrame* localFrame = WebLocalFrame::create(&client);
+ WebLocalFrame* localFrame = WebLocalFrame::create(&client);
+ localFrame->initializeToReplaceRemoteFrame(remoteFrame);
swapAndVerifySubframeConsistency("remote->local", targetFrame, localFrame);
// FIXME: This almost certainly fires more load events on the iframe element
« Source/web/WebLocalFrameImpl.cpp ('K') | « Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698