4 <script src="../../../resources/js-test.js"></script>
8 description("This test verifies that the setAttributeNode() API checks for existing attributes case-insensitively. Thus the value of an existing attribute with the same name but in a different case should get replaced by the new value specified via the setAttributeNode() method.");
10 var test = document.getElementById("test");
11 var newStyleAttr = document.createAttribute("STYLE");
12 newStyleAttr.value = "background-color: green";
13 test.setAttributeNode(newStyleAttr);
14 if (window.testRunner) {
15 shouldBe("test.getAttribute('style')", "test.getAttribute('STYLE')");
16 shouldBe("test.getAttributeNode('style').value", "test.getAttributeNode('STYLE').value");
21 <body onload="runTest()">
22 <div>Test for Bugzilla bug:<a href="https://bugs.webkit.org/show_bug.cgi?id=90341"> 90341:</a> createAttribute/setAttributeNode does not properly normalize case.</div>
23 <div id="test" style="background-color: red"> </div>
24 <div id="description"></div>
25 <div id="console"></div>