Index: LayoutTests/fast/dom/importNode-cdata.html |
diff --git a/LayoutTests/fast/dom/importNode-cdata.html b/LayoutTests/fast/dom/importNode-cdata.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a9b65d4d754186a5bed16634250fd0721b3ee274 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/importNode-cdata.html |
@@ -0,0 +1,26 @@ |
+<html> |
esprehn
2014/05/30 01:53:33
Missing doctype. We also generally leave off the <
|
+ <body> |
+ <p>This is a test to verify that importNode of a CDATASection on a HTML Document works. |
+ <div id="output"/> |
esprehn
2014/05/30 01:53:33
</div>, what you have makes the div wrap the <scri
|
+ <script type="text/javascript"> |
esprehn
2014/05/30 01:53:33
leave off type attr
|
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ var output = document.getElementById('output'); |
+ var p = new DOMParser(); |
+ var doc = p.parseFromString('<root><![CDATA[ ]]></root>', "application/xml"); |
+ |
+ try { |
+ var node = document.importNode(doc.documentElement, true); |
+ if (node.firstChild.ownerDocument != document) { |
+ output.innerHTML = "FAILED because imported CDATASection has wrong owner document\n"; |
+ return; |
+ } |
+ output.innerHTML = "PASSED\n"; |
esprehn
2014/05/30 01:53:33
textContent
|
+ } catch (e) { |
+ output.innerHTML = "FAILED with exception " + e + "\n"; |
esprehn
2014/05/30 01:53:33
textContent
|
+ } |
+ </script> |
+ </body> |
+</html> |
+ |