Index: LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html |
diff --git a/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html b/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html |
index 68f202bfefc24f1e0889bbb88f2ee407438cd3c0..6fe0d5b69f4f476ced53d0653e9bee29a65fb7c0 100644 |
--- a/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html |
+++ b/LayoutTests/fast/dom/Element/setAttributeNode-case-insensitivity.html |
@@ -15,6 +15,34 @@ function runTest() |
shouldBe("test.getAttribute('style')", "test.getAttribute('STYLE')"); |
shouldBe("test.getAttributeNode('style').value", "test.getAttributeNode('STYLE').value"); |
} |
+ |
+ debug("Verifying that attributes with the same name but different namespaces are treated as unique entities. For the following test two different attribute values should be returned."); |
+ var newAttr1 = document.createAttributeNS("ns1", "newattr"); |
+ newAttr1.prefix = "prefix1"; |
+ newAttr1.value = "newattr1"; |
+ test.setAttributeNode(newAttr1); |
+ var newAttr2 = document.createAttributeNS("ns2", "newattr"); |
+ newAttr2.prefix = "prefix2"; |
+ newAttr2.value = "newattr2"; |
+ test.setAttributeNode(newAttr2); |
+ if (window.testRunner) { |
+ shouldBe("test.getAttributeNodeNS('ns1', 'newattr').value", "'newattr1'"); |
+ shouldBe("test.getAttributeNodeNS('ns2', 'newattr').value", "'newattr2'"); |
+ } |
+ |
+ debug("Verifying that attributes with same name but different case and having same namespaces are treated as same. In the following test the new attribute should overwrite the value of the existing one."); |
+ var newAttr3 = document.createAttributeNS("ns1", "NEWATTR"); |
+ newAttr3.prefix = "prefix2"; |
+ newAttr3.value = "newattr3"; |
+ test.setAttributeNode(newAttr3); |
+ |
+ if (window.testRunner) { |
+ shouldBe("test.getAttributeNodeNS('ns1', 'newattr').value", "'newattr3'"); |
+ |
+ isSuccessfullyParsed(); |
+ test.style.display = 'none'; |
+ } |
+ |
} |
</script> |
</head> |