summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html
blob: 670710090e1299a91d38ae68fc080efa75151879 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script>
onload = function() {
  window.test_prop = 1;
  parent.tests[0].step(function() {parent.assert_equals(test_prop, 1)});
  document.open();
  document.write("<script>test_prop = 2;<\/script>");
  document.close();
  parent.tests[0].step(function() {parent.assert_equals(test_prop, 1)});
  parent.tests[1].step(function() {parent.assert_equals(window.test_prop, 2)});
  parent.tests[2].step(function() {parent.assert_equals(get_this(), window)});
  parent.tests_done();
};

function get_this() {
  return this;
}
</script>