Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <?xml version="1.0"?>
2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=706301
6 -->
7 <window title="Mozilla Bug 706301"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
11 <!-- test results are displayed in the html:body -->
12 <body xmlns="http://www.w3.org/1999/xhtml">
13 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=706301"
14 target="_blank">Mozilla Bug 706301</a>
15 <iframe id="ifr" src="http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/file_bug706301.html" onload="doTest();" />
16 </body>
18 <!-- test code goes here -->
19 <script type="application/javascript">
20 <![CDATA[
21 /** Test for Bug 706301 **/
23 SimpleTest.waitForExplicitFinish();
25 function getLengthInChrome(nodelist) {
27 // Make sure the object is Xray wrapped.
28 ok(nodelist === XPCNativeWrapper(nodelist), "object passed from content to chrome " +
29 "should be Xray-wrapped.");
31 // Perform the operation.
32 Object.getOwnPropertyDescriptor(nodelist, 'length');
33 return nodelist['length'] == 0;
34 }
36 function finishTestInChrome() {
37 SimpleTest.finish();
38 }
40 function doTest() {
42 // Set up the callbacks for content.
43 $('ifr').contentWindow.wrappedJSObject.getLengthInChrome = getLengthInChrome;
44 $('ifr').contentWindow.wrappedJSObject.finishTestInChrome = finishTestInChrome;
45 $('ifr').contentWindow.wrappedJSObject.ok = ok;
47 // Kick off the test.
48 $('ifr').contentWindow.postMessage({}, '*');
49 }
50 ]]>
51 </script>
52 </window>