<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8"/>
  <title>Test for Bug 1260931</title>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<script>
function onload() {
  let iframe1 = document.getElementById("iframe1");
  iframe1.contentWindow.postMessage("HI", "https://example.net");
}

window.onmessage = function(evt) {
  document.getElementById("message").textContent = evt.data;

  let iframe2 = document.createElement("iframe");
  iframe2.src = "dummy.html";
  document.body.appendChild(iframe2);
};
</script>
<body onload="onload()">
  <div>
    <iframe id="iframe1" src="test.html"></iframe>
    <span id="message"></span>
  </div>
</body>
</html>
