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

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

Issue 1109213002: Make createWindow (mostly) work with OOPIF (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix style, use FrameView::root Created 5 years, 8 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: Source/web/tests/WebFrameTest.cpp
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
index b2fa97b1a25a355e4b98c77bbef72bae9aed76a0..f379a7e1be54a621552bae5b1a829cceae8c26e2 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -7124,6 +7124,24 @@ TEST_F(WebFrameSwapTest, NavigateRemoteFrameViaLocation)
reset();
}
+TEST_F(WebFrameSwapTest, WindowOpenOnRemoteFrame)
+{
+ RemoteNavigationClient remoteClient;
+ WebRemoteFrame* remoteFrame = remoteClient.frame();
+ mainFrame()->firstChild()->swap(remoteFrame);
+ remoteFrame->setReplicatedOrigin(WebSecurityOrigin::createFromString("http://127.0.0.1"));
+
+ KURL destination = toKURL("data:text/html:destination");
+ ASSERT_TRUE(mainFrame()->isWebLocalFrame());
+ ASSERT_TRUE(mainFrame()->firstChild()->isWebRemoteFrame());
+ LocalDOMWindow* mainWindow = toWebLocalFrameImpl(mainFrame())->frame()->localDOMWindow();
+ mainWindow->open(destination.string(), "frame1", "", mainWindow, mainWindow);
+ ASSERT_FALSE(remoteClient.lastRequest().isNull());
+ EXPECT_EQ(remoteClient.lastRequest().url(), WebURL(destination));
+
+ reset();
+}
+
class CommitTypeWebFrameClient : public FrameTestHelpers::TestWebFrameClient {
public:
explicit CommitTypeWebFrameClient()

Powered by Google App Engine
This is Rietveld 408576698