test_bug1075702.html (1532B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1075702 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title> Test for Bug 1075702 </title> 9 <script src="/tests/SimpleTest/SimpleTest.js"> </script> 10 <script src="/tests/SimpleTest/EventUtils.js"> </script> 11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 12 </head> 13 <body> 14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1075702"> Mozilla Bug 1075702 </a> 15 <p id="display"></p> 16 17 <pre id="test"> 18 <script type="application/javascript"> 19 20 /** Test for Bug 1075702 */ 21 function test() { 22 // test: Element.removeAttributeNode() 23 24 var a1 = document.createAttribute("aa"); 25 a1.nodeValue = "lowercase"; 26 27 var a2 = document.createAttributeNS("", "AA"); 28 a2.nodeValue = "UPPERCASE"; 29 30 document.documentElement.setAttributeNode(a1); 31 document.documentElement.setAttributeNode(a2); 32 33 is(document.documentElement.getAttributeNS("", "aa"), "lowercase", "Should be lowercase!"); 34 is(document.documentElement.getAttributeNS("", "AA"), "UPPERCASE", "Should be UPPERCASE!"); 35 36 var a3 = document.createAttribute("AA"); 37 a3.nodeValue = "UPPERCASE AGAIN"; 38 document.documentElement.setAttributeNode(a3); 39 40 is(document.documentElement.getAttributeNS("", "aa"), "UPPERCASE AGAIN", 41 "Should be UPPERCASE AGAIN!"); 42 is(document.documentElement.getAttributeNS("", "AA"), "UPPERCASE", "Should be UPPERCASE!"); 43 44 SimpleTest.finish(); 45 } 46 47 SimpleTest.waitForExplicitFinish(); 48 SimpleTest.executeSoon(test); 49 </script> 50 </body> 51 </html>