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

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

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 <title>Node.nodeName</title>
3 <script src="../../../../resources/testharness.js"></script>
4 <script src="../../../../resources/testharnessreport.js"></script>
5 <div id="log"></div>
6 <script>
7 test(function() {
8 var HTMLNS = "http://www.w3.org/1999/xhtml",
9 SVGNS = "http://www.w3.org/2000/svg"
10 assert_equals(document.createElementNS(HTMLNS, "I").nodeName, "I")
11 assert_equals(document.createElementNS(HTMLNS, "i").nodeName, "I")
12 assert_equals(document.createElementNS(SVGNS, "svg").nodeName, "svg")
13 assert_equals(document.createElementNS(SVGNS, "SVG").nodeName, "SVG")
14 assert_equals(document.createElementNS(HTMLNS, "x:b").nodeName, "X:B")
15 }, "For Element nodes, nodeName should return the same as tagName.")
16 test(function() {
17 assert_equals(document.createTextNode("foo").nodeName, "#text")
18 }, "For Text nodes, nodeName should return \"#text\".")
19 test(function() {
20 assert_equals(document.createComment("foo").nodeName, "#comment")
21 }, "For Comment nodes, nodeName should return \"#comment\".")
22 test(function() {
23 assert_equals(document.nodeName, "#document")
24 }, "For Document nodes, nodeName should return \"#document\".")
25 test(function() {
26 assert_equals(document.doctype.nodeName, "html")
27 }, "For DocumentType nodes, nodeName should return the name.")
28 test(function() {
29 assert_equals(document.createDocumentFragment().nodeName,
30 "#document-fragment")
31 }, "For DocumentFragment nodes, nodeName should return \"#document-fragment\".")
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698