diff options
Diffstat (limited to 'testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_009.html')
-rw-r--r-- | testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_009.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_009.html b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_009.html new file mode 100644 index 000000000..8b271c7a0 --- /dev/null +++ b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_009.html @@ -0,0 +1,21 @@ +<!doctype html> +<title>document.write plaintext into iframe</title> +<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script> +<iframe id="test"></iframe> +<script> +test(function() { + var iframe = document.getElementById("test"); + var s = "<table><tr><td>Text</tr><plaintext><tr><td>Filler "; + for (var i=0; i<s.length; i++) { + iframe.contentDocument.write(s[i]); + } + iframe.contentDocument.close(); + assert_equals(iframe.contentDocument.body.childNodes[0].nodeType, document.ELEMENT_NODE); + assert_equals(iframe.contentDocument.body.childNodes[0].localName, "plaintext"); + assert_equals(iframe.contentDocument.body.childNodes[0].textContent, "<tr><td>Filler "); + assert_equals(iframe.contentDocument.body.childNodes[1].nodeType, document.ELEMENT_NODE); + assert_equals(iframe.contentDocument.body.childNodes[1].localName, "table"); + assert_equals(iframe.contentDocument.body.childNodes[1].textContent, "Text"); +}); +</script> +<div id="log"></div> |