| OLD | NEW |
| 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 Loading... |
| 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"'); |
| OLD | NEW |