Index: LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html |
diff --git a/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c9ef03b523e9051fb2ece16af16f0123a0f99138 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Element/setAttributeNode-for-existing-attribute.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+function runTest() { |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ var testElement = document.getElementById('test'); |
+ var testElementBgColor = testElement.style.background; |
+ |
+ var newAttr = document.createAttribute("STYLE"); |
+ newAttr.value = "background-color: green"; |
+ testElement.setAttributeNode(newAttr); |
+ var testElementBgColorAfterReset = testElement.style.background; |
+ |
+ document.getElementById('result').innerHTML = "background-color specified with lowercase style attribute was: "+testElementBgColor+" and specified with uppercase style attribute is: "+testElementBgColorAfterReset; |
+} |
+</script> |
+</head> |
+<body onload="runTest();"> |
+<div>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.\nThe issue can be manually verified by ascertaining that a green colored block is displayed instead of a red one.</div> |
+<div id="test" style="background-color: red;"/> </div> |
+<div id="result"></div> |
+</body> |
+</html> |