summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/close_script_defer.html
blob: 874f5be9da396cc15a3a206bdf259e74d5281d3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<title>Running defer script in window.close()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var t = async_test(undefined, {timeout:4000});
t.step(function() {
  var w = window.open("close_script_defer-1.html");
  w.document.open()
  w.document.write("<script defer src='callback.js'><\/script>")
  setTimeout(function() {
    w.close();
  }, 1000);
})
setTimeout(function() {t.done();}, 1000)
callback = t.step(function() {assert_unreached()})
</script>