blob: 55026665b85ed509f3ed831985886730aa3de1e6 [file] [log] [blame]
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<script>
function runTest()
{
description("This test verifies that the getAttribute() and the getAttributeNode() APIs convert the passed attribute name to lowercase before comparing against existing attributes.");
var test = document.getElementById("test");
test.setAttributeNS(null, "NEWATTR", "FAIL");
test.setAttributeNS(null, "newattr", "PASS");
if (window.testRunner) {
shouldBe("test.getAttribute('NEWATTR')", "'PASS'");
shouldBe("test.getAttributeNode('NEWATTR').value", "'PASS'");
shouldBe("test.getAttributeNS(null, 'NEWATTR')", "'FAIL'");
shouldBe("test.getAttribute('newattr')", "'PASS'");
shouldBe("test.getAttributeNode('newattr').value", "'PASS'");
shouldBe("test.getAttributeNS(null, 'newattr')", "'PASS'");
isSuccessfullyParsed();
}
}
</script>
</head>
<body onload="runTest()">
<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>
<div id="test"></div>
<div id="description"></div>
<div id="console"></div>
</body>
</html>