content/base/test/test_bug693615.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 type="application/javascript" 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">
    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 */
    25 var content = document.getElementById("content");
    27 // called directly (quickstubs)
    28 var defaultNS = content.lookupNamespaceURI(null);
    29 is(defaultNS, null, "direct access working");
    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");
    38 </script>
    39 </pre>
    40 </body>
    41 </html>

mercurial