Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: LayoutTests/fast/dom/importNode-cdata.html

Issue 167653002: Make importNode work when the XML document contains a CDATA section (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and fix test Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/importNode-cdata-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f9d8127633372359a331dd2b4b20ccb9ad48d5ef
--- /dev/null
+++ b/LayoutTests/fast/dom/importNode-cdata.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<p>This is a test to verify that importNode of a CDATASection on a HTML Document works.
+<div id="output"></div>
+<script>
+ 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.textContent = "FAILED because imported CDATASection has wrong owner document\n";
+ } else {
+ output.textContent = "PASSED\n";
+ }
+ } catch (e) {
+ output.textContent = "FAILED with exception " + e + "\n";
+ }
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/importNode-cdata-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698