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() |