testing/web-platform/tests/portals/portals-cross-origin-load.sub.html
author Adithya Srinivasan <adithyas@chromium.org>
Tue, 12 Feb 2019 14:08:56 +0000
changeset 459262 09befdcd331f690d9044d82157802f1cc9e2ebbd
child 477396 9f3c2bb59bf3114ee4fccc1e4244ce6096a53454
permissions -rw-r--r--
Bug 1526467 [wpt PR 15026] - Portals: Send detach message to browser process for portals, a=testonly Automatic update from web-platform-tests Portals: Send detach message to browser process for portals We don't currently send a message because the RenderFrameProxy created has no parent (so it looks like a main frame). This ensures that same-origin frames within the portal are also detached. The test added would fail with --enable-leak-detection without this change (the iframe inside the portal would leak). Bug: 923898 Change-Id: I2b56b8e303b40d275976da5ed8a0fdde7726b51c Reviewed-on: https://chromium-review.googlesource.com/c/1430586 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Reviewed-by: Lucas Gadani <lfg@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Commit-Queue: Adithya Srinivasan <adithyas@chromium.org> Cr-Commit-Position: refs/heads/master@{#628179} -- wpt-commits: bf09c7c954ec1bf3860448d9db98d040c5ad5354 wpt-pr: 15026

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
  promise_test(async () => {
    var bc = new BroadcastChannel("portals-cross-origin-load");
    var receiveMessage = new Promise((resolve, reject) => {
      bc.onmessage = e => {
        bc.close();
        resolve();
      }
    });
    var portal = document.createElement("portal");
    portal.src = "http://{{hosts[alt][www]}}:{{ports[http][0]}}/portals/resources/portal-cross-origin.sub.html";
    document.body.appendChild(portal);
    return receiveMessage;
  });
</script>
</body>