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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/Node-nodeName-xhtml.xhtml

Issue 1529523002: Import dom/ from web-platform-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak W3CImportExpectations Created 5 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 xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>Node.nodeName</title>
5 <script src="../../../../resources/testharness.js"></script>
6 <script src="../../../../resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <div id="log"/>
10 <script>
11 test(function() {
12 var HTMLNS = "http://www.w3.org/1999/xhtml",
13 SVGNS = "http://www.w3.org/2000/svg"
14 assert_equals(document.createElementNS(HTMLNS, "I").nodeName, "I")
15 assert_equals(document.createElementNS(HTMLNS, "i").nodeName, "i")
16 assert_equals(document.createElementNS(SVGNS, "svg").nodeName, "svg")
17 assert_equals(document.createElementNS(SVGNS, "SVG").nodeName, "SVG")
18 assert_equals(document.createElementNS(HTMLNS, "x:b").nodeName, "x:b")
19 }, "For Element nodes, nodeName should return the same as tagName.")
20 test(function() {
21 assert_equals(document.createTextNode("foo").nodeName, "#text")
22 }, "For Text nodes, nodeName should return \"#text\".")
23 test(function() {
24 assert_equals(document.createProcessingInstruction("foo", "bar").nodeName,
25 "foo")
26 }, "For ProcessingInstruction nodes, nodeName should return the target.")
27 test(function() {
28 assert_equals(document.createComment("foo").nodeName, "#comment")
29 }, "For Comment nodes, nodeName should return \"#comment\".")
30 test(function() {
31 assert_equals(document.nodeName, "#document")
32 }, "For Document nodes, nodeName should return \"#document\".")
33 test(function() {
34 assert_equals(document.doctype.nodeName, "html")
35 }, "For DocumentType nodes, nodeName should return the name.")
36 test(function() {
37 assert_equals(document.createDocumentFragment().nodeName,
38 "#document-fragment")
39 }, "For DocumentFragment nodes, nodeName should return \"#document-fragment\".")
40 </script>
41 </body>
42 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698