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

Side by Side Diff: LayoutTests/fast/dom/DocumentType/clone-node.html

Issue 102533002: Implemented DocumentType.cloneNode(bool) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html><head><title>DocumentType.cloneNode()</title>
3 <link rel="help" href="http://dom.spec.whatwg.org/#dom-node-clonenode">
esprehn 2013/12/09 17:19:08 Just leave out the <html>, <head> and <body>. You
4 </head><body>
5 <script src="../../../resources/js-test.js"></script><script>
6 description('Tests cloneNode for DocumentType.');
7
8 shouldBeNonNull("document.doctype");
9 shouldBe("document.doctype.parentNode", "document");
10
11 var cd = document.doctype.cloneNode(false);
12 shouldBeNonNull("cd");
13 shouldBe("cd.publicId", "document.doctype.publicId");
14 shouldBe("cd.systemId", "document.doctype.systemId");
15 shouldBe("cd.parentNode", "null");
16 shouldBe("cd.ownerDocument", "document");
17
18 var doc = document.implementation.createDocument(null, null, null);
19 cd = doc.importNode(cd, true);
20
21 shouldBe("cd.publicId", "document.doctype.publicId");
22 shouldBe("cd.systemId", "document.doctype.systemId");
23 shouldBe("cd.parentNode", "null");
24 shouldBe("cd.ownerDocument", "doc");
25 doc.appendChild(cd);
26 shouldBe("cd.parentNode", "doc");
27
28 var cd = document.implementation.createDocumentType(
29 "a", "b", "c").cloneNode(false);
30 shouldBe("cd.name", "'a'");
31 shouldBe("cd.publicId", "'b'");
32 shouldBe("cd.systemId", "'c'");
33 shouldBe("cd.parentNode", "null");
34 shouldBe("cd.ownerDocument", "document");
35
36 </script><script src="../../../resources/js-test-post.js"></script></body>
esprehn 2013/12/09 17:19:08 post.js does nothing now, remove that
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DocumentType/clone-node-expected.txt » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698