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

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: Rebase 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 8ee7b11a0a43541080c98ce9f35233f410ca1262..66ed360bf1fc5e1147b8e9b944b0bee8c024fa1e 100644
--- a/Source/web/tests/WebFrameTest.cpp
+++ b/Source/web/tests/WebFrameTest.cpp
@@ -7068,6 +7068,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