tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug1060938.html (1310B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1060938
      5 -->
      6  <head>
      7    <meta charset="utf-8">
      8    <title> Test for Bug 1060938 </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=1060938"> Mozilla Bug 1060938 </a>
     15  <p id="display"></p>
     16 
     17  <pre id="test">
     18  <script type="application/javascript">
     19 
     20    /** Test for Bug 1060938 */
     21    // test: Element.removeAttributeNode()
     22 
     23    parent = document.getElementsByTagName("p")[0];
     24    parent.setAttributeNS("www.test1.com", "ID", "Test1");
     25    parent.setAttributeNS("www.test2.com", "Class", "Test2");
     26    parent.setAttribute("id", "www.test3.com");
     27    parent.className = "www.test4.com";
     28 
     29    allAttributes = parent.attributes;
     30 
     31    function removeAttr(iter){
     32      var removed_attribute = allAttributes[0];
     33      is(removed_attribute, parent.removeAttributeNode(removed_attribute),
     34          "(" + iter + ")" + " Returned attribute and remove attribute should be same.");
     35    }
     36 
     37    removeAttr(1);
     38    removeAttr(2);
     39    removeAttr(3);
     40    removeAttr(4);
     41 
     42  </script>
     43  </body>
     44 </html>