| Index: Source/web/tests/WebFrameTest.cpp
|
| diff --git a/Source/web/tests/WebFrameTest.cpp b/Source/web/tests/WebFrameTest.cpp
|
| index a2261fc7dd95e4811121d378c6d09d5f940b2aeb..d26965fd60e5c94fd4a20ccb4444e7fbe76458f1 100644
|
| --- a/Source/web/tests/WebFrameTest.cpp
|
| +++ b/Source/web/tests/WebFrameTest.cpp
|
| @@ -7793,6 +7793,28 @@ TEST_P(ParameterizedWebFrameTest, CreateLocalChildWithPreviousSibling)
|
| view->close();
|
| }
|
|
|
| +TEST_P(ParameterizedWebFrameTest, SendBeaconFromChildWithRemoteMainFrame)
|
| +{
|
| + FrameTestHelpers::TestWebViewClient viewClient;
|
| + FrameTestHelpers::TestWebRemoteFrameClient remoteClient;
|
| + WebView* view = WebView::create(&viewClient);
|
| + view->settings()->setJavaScriptEnabled(true);
|
| + view->setMainFrame(remoteClient.frame());
|
| + WebRemoteFrame* root = view->mainFrame()->toWebRemoteFrame();
|
| + root->setReplicatedOrigin(SecurityOrigin::createUnique());
|
| +
|
| + FrameTestHelpers::TestWebFrameClient localFrameClient;
|
| + WebLocalFrame* localFrame = root->createLocalChild(WebTreeScopeType::Document, "", WebSandboxFlags::None, &localFrameClient, nullptr);
|
| +
|
| + // Finally, make sure an embedder triggered load in the local frame swapped
|
| + // back in works.
|
| + registerMockedHttpURLLoad("send_beacon.html");
|
| + registerMockedHttpURLLoad("reload_post.html"); // url param to sendBeacon()
|
| + FrameTestHelpers::loadFrame(localFrame, m_baseURL + "send_beacon.html");
|
| +
|
| + view->close();
|
| +}
|
| +
|
| class OverscrollWebViewClient : public FrameTestHelpers::TestWebViewClient {
|
| public:
|
| MOCK_METHOD4(didOverscroll, void(const WebFloatSize&, const WebFloatSize&, const WebFloatPoint&, const WebFloatSize&));
|
|
|