Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / importNode-cdata.html
blobf9d8127633372359a331dd2b4b20ccb9ad48d5ef
1 <!DOCTYPE html>
2 <p>This is a test to verify that importNode of a CDATASection on a HTML Document works.
3 <div id="output"></div>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 var output = document.getElementById('output');
9 var p = new DOMParser();
10 var doc = p.parseFromString('<root><![CDATA[ ]]></root>', "application/xml");
12 try {
13 var node = document.importNode(doc.documentElement, true);
14 if (node.firstChild.ownerDocument != document) {
15 output.textContent = "FAILED because imported CDATASection has wrong owner document\n";
16 } else {
17 output.textContent = "PASSED\n";
19 } catch (e) {
20 output.textContent = "FAILED with exception " + e + "\n";
22 </script>