dom/workers/test/sharedWorker_thirdparty_window.html
author Andrea Marchesini <amarchesini@mozilla.com>
Fri, 08 Mar 2019 09:03:15 +0000
changeset 463124 98ff0248c6079b9518e2b96d19bacb5402a21bda
parent 461227 4cde0e38ada8218b273caa8ea90eae0307f9a589
permissions -rw-r--r--
Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 10 - Fix existing tests, r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D18958

<!--
  Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for SharedWorker in 3rd Party Iframes</title>
</head>
<body>
  <script>

  let url = new URL(window.location);

  let frame = document.createElement('iframe');
  frame.src =
    'http://example.org/tests/dom/workers/test/sharedWorker_thirdparty_frame.html?name=' + url.searchParams.get('name');
  document.body.appendChild(frame);
  window.addEventListener('message', evt => {
    frame.remove();
    opener.postMessage(evt.data, "*");
  }, {once: true});

  </script>
</body>
</html>