Chromium Code Reviews| Index: LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-xml.html |
| diff --git a/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-xml.html b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-xml.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e94e2945ac128089a676b1f520aa08ff9377637a |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-xml.html |
| @@ -0,0 +1,30 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../js/resources/js-test-pre.js"></script> |
| +<script> |
| + description('Testcase for bug <a href="http://crbug.com/279193">279193</a>: setAttributeNode() does not set the new value to an existing attribute if specified attribute is in a different case.\nThis testcase verifies that attributes with the same name but in different case are added separately for XML documents.'); |
| + |
| + var doc = document.implementation.createDocument(null, 'root', null); |
| + doc.documentElement.setAttribute('x', 'x'); |
| + |
| + var attr = doc.createAttribute('X'); |
| + attr.value = 'X'; |
| + doc.documentElement.setAttributeNode(attr); |
| + |
| + shouldBe('doc.documentElement.attributes.length', '2'); |
| + shouldBeEqualToString('doc.documentElement.getAttribute("x")', 'x'); |
| + shouldBeEqualToString('doc.documentElement.getAttribute("X")', 'X'); |
| + |
| + var attr2 = doc.createAttribute('X'); |
| + attr2.value = 'Y'; |
| + doc.documentElement.setAttributeNode(attr2); |
| + |
| + shouldBe('doc.documentElement.attributes.length', '2'); |
| + shouldBeEqualToString('doc.documentElement.getAttribute("x")', 'x'); |
| + shouldBeEqualToString('doc.documentElement.getAttribute("X")', 'Y'); |
| +</script> |
| +</head> |
|
arv (Not doing code reviews)
2013/08/29 14:18:16
js-test-post
|
| +<body> |
| +</body> |
| +</html> |