Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
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>