getAttribute does not behave correctly for mixed-case attributes on HTML elements
[WebKit-https.git] / LayoutTests / fast / dom / Element / getAttribute-case-insensitivity.html
1 <html>
2 <head>
3 <script src="../../js/resources/js-test-pre.js"></script>
4 <script>
5 function runTest()
6 {
7     description("This test verifies that the getAttribute() and the getAttributeNode() APIs convert the passed attribute name to lowercase before comparing against existing attributes.");
8     
9     var test = document.getElementById("test");
10     test.setAttributeNS(null, "NEWATTR", "FAIL");
11     test.setAttributeNS(null, "newattr", "PASS");
12     
13     if (window.testRunner) {
14         shouldBe("test.getAttribute('NEWATTR')", "'PASS'");
15         shouldBe("test.getAttributeNode('NEWATTR').value", "'PASS'");
16         shouldBe("test.getAttributeNS(null, 'NEWATTR')", "'FAIL'");
17         shouldBe("test.getAttribute('newattr')", "'PASS'");
18         shouldBe("test.getAttributeNode('newattr').value", "'PASS'");
19         shouldBe("test.getAttributeNS(null, 'newattr')", "'PASS'");
20     
21         isSuccessfullyParsed();
22     }
23 }
24 </script>
25 </head>
26 <body onload="runTest()">
27 <div>Test for Bugzilla bug:<a href="https://bugs.webkit.org/show_bug.cgi?id=105713"> 105713:</a>  getAttribute does not behave correctly for mixed-case attributes on HTML testements.</div>
28 <div id="test"></div>
29 <div id="description"></div>
30 <div id="console"></div>
31 </body>
32 </html>