docshell/test/navigation/file_bug1375833.html
author Daisuke Akatsuka <dakatsuka@mozilla.com>
Tue, 26 Feb 2019 10:21:29 +0000
changeset 518943 383b6665578306219dd34b178353e100ca2848eb
parent 501290 27b21e84ba9c64b4ea42711cc77f94f5f253e9be
permissions -rw-r--r--
Bug 1525615: Introduce 'card' style. r=jdescottes,ladybenko Depends on D20295 Differential Revision: https://phabricator.services.mozilla.com/D20640

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Test for bug 1375833</title>
  </head>
  <body onload="test();">
    <iframe id="testFrame" src="file_bug1375833-frame1.html"></iframe>
    <script type="application/javascript">
    function test() {
      let iframe = document.querySelector("#testFrame");
      setTimeout(function() { iframe.src = "file_bug1375833-frame1.html"; }, 0);
      iframe.onload = function(e) {
        setTimeout(function() { iframe.src = "file_bug1375833-frame2.html"; }, 0);
        iframe.onload = function() {
          opener.postMessage(iframe.contentWindow.location.href, "*");
        };
      };
    }
    </script>
  </body>
</html>