| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| function runTest() { |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var testElement = document.getElementById('test'); |
| var testElementBgColor = testElement.style.backgroundColor; |
| |
| var newAttr = document.createAttribute("STYLE"); |
| newAttr.value = "background-color: green"; |
| testElement.setAttributeNode(newAttr); |
| var testElementBgColorAfterReset = testElement.style.backgroundColor; |
| |
| 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();"> |
| <p>This test legacy behavior that were replaced when a spec was written. This test is supposed to fail to set the style.</p> |
| <div>Testcase for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=120293">120293</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> |