diff options
Diffstat (limited to 'testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_008.html')
-rw-r--r-- | testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_008.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_008.html b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_008.html new file mode 100644 index 000000000..c814958d1 --- /dev/null +++ b/testing/web-platform/tests/html/dom/dynamic-markup-insertion/document-write/iframe_008.html @@ -0,0 +1,18 @@ +<!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 = "<plaintext><span>Filler Text"; + 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, "<span>Filler Text"); +}); +</script> +<div id="log"></div> |