summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html')
-rw-r--r--testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html
new file mode 100644
index 000000000..670710090
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/015-1.html
@@ -0,0 +1,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>