dom/indexedDB/test/third_party_window.html
author Andrea Marchesini <amarchesini@mozilla.com>
Wed, 27 Feb 2019 19:57:47 +0000
changeset 519391 6a8401de32379f23a5544a7e0b5b1b16916fd581
parent 519094 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/
-->
<html>
<head>
  <title>Indexed Database Test</title>
  <script type="text/javascript">
    let init = false;
    onmessage = evt => {
      if (!init) {
        init = true;

        let iframe = document.getElementById("iframe1");
        iframe.src = evt.data.iframeUrl;

        iframe.addEventListener("load", e => {
          iframe.contentWindow.postMessage(evt.data.toSource(), "*");
        });

        return;
      }

      opener.postMessage(evt.data, "*");
    };
  </script>
</head>

<body>
  <iframe id="iframe1"></iframe>
</body>

</html>