tor-browser

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

test_bug693615.html (1180B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=693615
      5 -->
      6 <head>
      7  <title>Test for Bug 693615</title>
      8  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      9  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     10 </head>
     11 <body>
     12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=693615">Mozilla Bug 693615</a>
     13 <p id="display"></p>
     14 <div id="content" style="display: none">
     15 </div>
     16 <pre id="test">
     17 <script type="application/javascript">
     18 
     19 /** Test for Bug 693615 */
     20 /*
     21 The following code tests if calling the DOM method Node::lookupNamespaceURI
     22 directly (with quickstubs) and through XPCOM leads to the same result.
     23 */
     24 
     25 var content = document.getElementById("content");
     26 
     27 // called directly (quickstubs)
     28 var defaultNS = content.lookupNamespaceURI(null);
     29 is(defaultNS, null, "direct access working");
     30 
     31 // called via XPCOM
     32 // deleting the method from the prototype forces the engine to go through XPCOM
     33 var proto = Object.getPrototypeOf(content);
     34 delete(proto.lookupNamespaceURI);
     35 var wrapperNS = content.lookupNamespaceURI(null);
     36 is(wrapperNS, null, "access through XPCOM working");
     37 
     38 </script>
     39 </pre>
     40 </body>
     41 </html>