Chromium Code Reviews| Index: LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-html.html |
| diff --git a/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-html.html b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-html.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..02a85c995850af592f9d9b7ad548e886651503a4 |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute-html.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 overwritten for HTML documents.'); |
| + |
| + var doc = document.implementation.createHTMLDocument(''); |
| + doc.documentElement.setAttribute('x', 'x'); |
| + |
| + var attr = doc.createAttribute('X'); |
| + attr.value = 'X'; |
| + doc.documentElement.setAttributeNode(attr); |
| + |
| + shouldBe('doc.documentElement.attributes.length', '1'); |
| + 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', '1'); |
| + shouldBeEqualToString('doc.documentElement.getAttribute("x")', 'Y'); |
| + shouldBeEqualToString('doc.documentElement.getAttribute("X")', 'Y'); |
| +</script> |
| +</head> |
| +<body> |
|
arv (Not doing code reviews)
2013/08/29 14:18:16
This should also have a js-test-post
|
| +</body> |
| +</html> |