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

Side by Side Diff: LayoutTests/fast/dom/Node/script-tests/initial-values.js

Issue 256773004: Convert qname with prefix to upper-case in tagName (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectation Created 6 years, 8 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/dom/Node/initial-values-expected.txt ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 description("Test creation of each type of Node and check intial values") 1 description("Test creation of each type of Node and check intial values")
2 2
3 var xmlDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtm l", "html", null); 3 var xmlDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtm l", "html", null);
4 4
5 debug("Attribute creation using createElement on an HTML doc:") 5 debug("Attribute creation using createElement on an HTML doc:")
6 var attr = document.createAttribute("foo"); 6 var attr = document.createAttribute("foo");
7 shouldBe("attr.nodeName", "'foo'"); 7 shouldBe("attr.nodeName", "'foo'");
8 shouldBe("attr.name", "'foo'"); 8 shouldBe("attr.name", "'foo'");
9 // Spec: http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-create Attribute 9 // Spec: http://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-create Attribute
10 // Both FF and WebKit return "foo" for Attribute.localName, even though the spec says null 10 // Both FF and WebKit return "foo" for Attribute.localName, even though the spec says null
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // FF returns "PRE" for localName, WebKit returns "pre", the spec says we should return null 69 // FF returns "PRE" for localName, WebKit returns "pre", the spec says we should return null
70 shouldBe("element.localName", "null"); 70 shouldBe("element.localName", "null");
71 // FF returns null for namespaceURI, WebKit returns http://www.w3.org/1999/xhtml , the spec says we should return null 71 // FF returns null for namespaceURI, WebKit returns http://www.w3.org/1999/xhtml , the spec says we should return null
72 shouldBe("element.namespaceURI", "null"); 72 shouldBe("element.namespaceURI", "null");
73 shouldBe("element.prefix", "null"); 73 shouldBe("element.prefix", "null");
74 shouldBe("element.nodeValue", "null"); 74 shouldBe("element.nodeValue", "null");
75 shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); 75 shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'");
76 76
77 debug("Prefixed element creation using createElementNS on an HTML doc:") 77 debug("Prefixed element creation using createElementNS on an HTML doc:")
78 element = document.createElementNS("http://www.w3.org/1999/xhtml", "html:pre"); 78 element = document.createElementNS("http://www.w3.org/1999/xhtml", "html:pre");
79 shouldBe("element.nodeName", "'html:pre'"); 79 shouldBe("element.nodeName", "'HTML:PRE'");
80 shouldBe("element.localName", "'pre'"); 80 shouldBe("element.localName", "'pre'");
81 shouldBe("element.namespaceURI", "'http://www.w3.org/1999/xhtml'"); 81 shouldBe("element.namespaceURI", "'http://www.w3.org/1999/xhtml'");
82 shouldBe("element.prefix", "'html'"); 82 shouldBe("element.prefix", "'html'");
83 shouldBe("element.nodeValue", "null"); 83 shouldBe("element.nodeValue", "null");
84 shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'"); 84 shouldBe("element.attributes.toString()", "'[object NamedNodeMap]'");
85 85
86 debug("SVG Element creation using createElementNS on an HTML doc:") 86 debug("SVG Element creation using createElementNS on an HTML doc:")
87 element = document.createElementNS("http://www.w3.org/2000/svg", "svg"); 87 element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
88 shouldBe("element.nodeName", "'svg'"); 88 shouldBe("element.nodeName", "'svg'");
89 shouldBe("element.localName", "'svg'"); 89 shouldBe("element.localName", "'svg'");
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 shouldBe("processingInstruction.target", "'xml-stylesheet'"); 153 shouldBe("processingInstruction.target", "'xml-stylesheet'");
154 shouldBe("processingInstruction.data", "'type=\"text/xsl\" href=\"missing.xsl\"' "); 154 shouldBe("processingInstruction.data", "'type=\"text/xsl\" href=\"missing.xsl\"' ");
155 155
156 debug("Text node creation using createTextNode on an HTML doc:") 156 debug("Text node creation using createTextNode on an HTML doc:")
157 var text = document.createTextNode("foo"); 157 var text = document.createTextNode("foo");
158 shouldBe("text.nodeName", "'#text'"); 158 shouldBe("text.nodeName", "'#text'");
159 shouldBe("text.localName", "null"); 159 shouldBe("text.localName", "null");
160 shouldBe("text.namespaceURI", "null"); 160 shouldBe("text.namespaceURI", "null");
161 shouldBe("text.nodeValue", "'foo'"); 161 shouldBe("text.nodeValue", "'foo'");
162 shouldBe("text.data", "'foo'"); 162 shouldBe("text.data", "'foo'");
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Node/initial-values-expected.txt ('k') | Source/core/html/HTMLElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698