Index: Source/web/tests/WebFrameTest.cpp |
diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp |
index 13ac82a2d3e4a6277c71f68531d02cfa5aa62091..bee3d34304efeb9510ebee0b8a90258c3aa89bea 100644 |
--- a/Source/web/tests/WebFrameTest.cpp |
+++ b/Source/web/tests/WebFrameTest.cpp |
@@ -7067,6 +7067,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 MockDocumentThreadableLoaderClient : public DocumentThreadableLoaderClient { |
public: |
MockDocumentThreadableLoaderClient() : m_failed(false) { } |