summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_010.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_010.html')
-rw-r--r--testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_010.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_010.html b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_010.html
new file mode 100644
index 000000000..8dc21a013
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_010.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<title>document.write plaintext</title>
+<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
+<iframe id="test"></iframe>
+<script>
+var t = async_test();
+var iframe = document.getElementById("test");
+
+function check_dom() {
+ assert_equals(iframe.contentDocument.body.childNodes[0].localName, "plaintext")
+ assert_equals(iframe.contentDocument.body.childNodes[0].textContent, "Filler ")
+ assert_equals(iframe.contentDocument.body.childNodes[1].localName, "table")
+}
+
+t.step(function() {
+ var s = "<script>document.write('<table><plaintext>Filler '); document.close(); top.t.step(function() {top.check_dom()})</script" + ">";
+ for (var i=0; i<s.length; i++) {
+ iframe.contentDocument.write(s[i]);
+ }
+ t.done();
+});
+</script>
+<div id="log"></div>