summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/document-open-cancels-javascript-url-navigation.html
blob: 5596382f2264cb84da5b528f18df74bbe79f4695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(t => {
  window.onload = t.step_func_done(() => assert_equals(i.contentDocument.body.innerText, "PASS"));

  var i = document.createElement('iframe');
  i.id ='i';
  i.src = "javascript:'FAIL'";
  document.body.appendChild(i);
  i.contentDocument.open();
  i.contentDocument.write("PASS")
  i.contentDocument.close();
});
</script>
</body>