summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/001.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/001.html')
-rw-r--r--testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/001.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/001.html b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/001.html
new file mode 100644
index 000000000..f82d80be7
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/001.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<title>Replacement of window object after document.open</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<iframe></iframe>
+<script>
+var t = async_test();
+
+onload = t.step_func(function() {
+ var iframe = document.getElementsByTagName("iframe")[0];
+ iframe.contentWindow.state = 1;
+ var handle = iframe.contentWindow;
+ iframe.contentDocument.open();
+ assert_false("state" in iframe.contentWindow, "Variables are not preserved after document.open");
+ assert_equals(iframe.contentWindow.state, undefined, "Variables are not preserved after document.open");
+ assert_equals(iframe.contentWindow, handle);
+ t.done();
+});
+</script>