Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../js/resources/js-test-pre.js"></script> | |
| 5 <script> | |
| 6 description('Testcase for bug <a href="http://crbug.com/279193">279193</a>: setAttributeNode() does not set the new value to an existing attribute if specif ied attribute is in a different case.\nThis testcase verifies that attributes wi th the same name but in different case are added separately for XML documents.') ; | |
| 7 | |
| 8 var doc = document.implementation.createDocument(null, 'root', null); | |
| 9 doc.documentElement.setAttribute('x', 'x'); | |
| 10 | |
| 11 var attr = doc.createAttribute('X'); | |
| 12 attr.value = 'X'; | |
| 13 doc.documentElement.setAttributeNode(attr); | |
| 14 | |
| 15 shouldBe('doc.documentElement.attributes.length', '2'); | |
| 16 shouldBeEqualToString('doc.documentElement.getAttribute("x")', 'x'); | |
| 17 shouldBeEqualToString('doc.documentElement.getAttribute("X")', 'X'); | |
| 18 | |
| 19 var attr2 = doc.createAttribute('X'); | |
| 20 attr2.value = 'Y'; | |
| 21 doc.documentElement.setAttributeNode(attr2); | |
| 22 | |
| 23 shouldBe('doc.documentElement.attributes.length', '2'); | |
| 24 shouldBeEqualToString('doc.documentElement.getAttribute("x")', 'x'); | |
| 25 shouldBeEqualToString('doc.documentElement.getAttribute("X")', 'Y'); | |
| 26 </script> | |
| 27 </head> | |
|
arv (Not doing code reviews)
2013/08/29 14:18:16
js-test-post
| |
| 28 <body> | |
| 29 </body> | |
| 30 </html> | |
| OLD | NEW |