Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<meta charset="utf-8">
<title> Test for Bug 1075702 </title>
<script src="/tests/SimpleTest/SimpleTest.js"> </script>
<script src="/tests/SimpleTest/EventUtils.js"> </script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1075702"> Mozilla Bug 1075702 </a>
<p id="display"></p>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 1075702 **/
function test() {
// test: Element.removeAttributeNode()
var a1 = document.createAttribute("aa");
a1.nodeValue = "lowercase";
var a2 = document.createAttributeNS("", "AA");
a2.nodeValue = "UPPERCASE";
document.documentElement.setAttributeNode(a1);
document.documentElement.setAttributeNode(a2);
is(document.documentElement.getAttributeNS("", "aa"), "lowercase", "Should be lowercase!");
is(document.documentElement.getAttributeNS("", "AA"), "UPPERCASE", "Should be UPPERCASE!");
var a3 = document.createAttribute("AA");
a3.nodeValue = "UPPERCASE AGAIN";
document.documentElement.setAttributeNode(a3);
is(document.documentElement.getAttributeNS("", "aa"), "UPPERCASE AGAIN",
"Should be UPPERCASE AGAIN!");
is(document.documentElement.getAttributeNS("", "AA"), "UPPERCASE", "Should be UPPERCASE!");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
SimpleTest.executeSoon(test);
</script>
</body>
</html>