Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / chrome / test_bug706301.xhtml
blob867f9222d265b7b5a375c0a5d6e4e66757f48a0d
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 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 is(nodelist, Cu.unwaiveXrays(nodelist),
29 "object passed from content to chrome should be Xray-wrapped.");
31 // Perform the operation.
32 Object.getOwnPropertyDescriptor(nodelist, 'length');
33 return !nodelist.length;
36 function finishTestInChrome() {
37 SimpleTest.finish();
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({}, '*');
50 ]]>
51 </script>
52 </window>