summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/033.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/033.html')
-rw-r--r--testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/033.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/033.html b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/033.html
new file mode 100644
index 000000000..1b8e1c270
--- /dev/null
+++ b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/033.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<title>document.write</title>
+<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script>
+<script>
+test(
+ function() {
+ document.writeln("<i");
+ var s = " b='a'>Filler"
+ for (var i=0; i<s.length; i++) {
+ document.write(s[i]+"\n");
+ }
+ document.writeln("</i");
+ document.writeln(">");
+ assert_equals(document.body.childNodes[0].localName, "i");
+ assert_equals(document.body.childNodes[0].getAttribute("b"), "\na\n");
+ assert_equals(document.body.childNodes[0].textContent, "\nF\ni\nl\nl\ne\nr\n");
+ }
+);
+</script>
+<div id="log"></div>