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/Element/script-tests/getAttribute-check-case-sensitivity.js

Issue 184273003: Allow overriding the serialization rules in MarkupAccumulator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased onto split out CLs. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 description( 1 description(
2 "<p>This file test the behaviour of getAttribute with regard to case.</p><p>See Bug 20247: setAttributeNode() does not work when attribute name has a capital le tter in it</p>" 2 "<p>This file test the behaviour of getAttribute with regard to case.</p><p>See Bug 20247: setAttributeNode() does not work when attribute name has a capital le tter in it</p>"
3 ); 3 );
4 4
5 function testGetAttributeCaseInsensitive() 5 function testGetAttributeCaseInsensitive()
6 { 6 {
7 var div = document.createElement('div'); 7 var div = document.createElement('div');
8 div.setAttribute("mixedCaseAttrib", "x"); 8 div.setAttribute("mixedCaseAttrib", "x");
9 9
10 // Do original case lookup, and lowercase lookup. 10 // Do original case lookup, and lowercase lookup.
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return a.nodeValue; 128 return a.nodeValue;
129 } 129 }
130 130
131 shouldBe("testAttribNodeNameGetMutate()", '"1"'); 131 shouldBe("testAttribNodeNameGetMutate()", '"1"');
132 132
133 var node = document.createElement("div"); 133 var node = document.createElement("div");
134 var attrib = document.createAttribute("myAttrib"); 134 var attrib = document.createAttribute("myAttrib");
135 attrib.nodeValue = "XXX"; 135 attrib.nodeValue = "XXX";
136 node.setAttributeNode(attrib); 136 node.setAttributeNode(attrib);
137 137
138 shouldBe("(new XMLSerializer).serializeToString(node)", '"<div myAttrib=\\"XXX\\ "></div>"'); 138 shouldBe("(new XMLSerializer).serializeToString(node)", '"<div xmlns=\\"http://w ww.w3.org/1999/xhtml\\" myAttrib=\\"XXX\\"></div>"');
139 shouldBe("node.getAttributeNode('myAttrib').name", '"myAttrib"'); 139 shouldBe("node.getAttributeNode('myAttrib').name", '"myAttrib"');
140 shouldBe("node.getAttributeNode('myattrib').name", '"myAttrib"'); 140 shouldBe("node.getAttributeNode('myattrib').name", '"myAttrib"');
141 shouldBe("attrib.name", '"myAttrib"'); 141 shouldBe("attrib.name", '"myAttrib"');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698