Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / chrome / test_bug738244.xhtml
blob96d0d880e6ea8215bd2c5c3fc795f35ec7da9f3f
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
4 type="text/css"?>
5 <!--
6 https://bugzilla.mozilla.org/show_bug.cgi?id=533596
7 -->
8 <window title="Mozilla Bug 533596"
9 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
10 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
12 <!-- test results are displayed in the html:body -->
13 <body xmlns="http://www.w3.org/1999/xhtml">
15 <iframe src="http://example.org/tests/js/xpconnect/tests/mochitest/file_bug738244.html"
16 onload="xrayTest(this)">
17 </iframe>
18 </body>
20 <!-- test code goes here -->
21 <script type="application/javascript"><![CDATA[
23 SimpleTest.waitForExplicitFinish();
25 function xrayTest(ifr) {
26 var win = ifr.contentWindow;
27 var doc = ifr.contentDocument;
29 doc.getElementById = 42;
30 is(doc.getElementById, 42,
31 "Native property cannot be shadowed on the xray");
33 is(doc.form1.name, "form1",
34 "Form elements cannot be found by name on the document through xray");
36 is(doc.form1.input1.name, "input1",
37 "Input element cannot be found by name on a form element through xray");
39 is(typeof doc.form1.appendChild, "function",
40 "Input element shadows native property with its name through xray");
42 is(win.frame1, undefined,
43 "IFrames should not be found by name on the window through xray");
45 is(win[0].name, "frame1",
46 "IFrames should be found by index on the window through xray");
48 win["1000"] = "foopy";
49 ok(!("1000" in win), "Shouldn't be able to add indexed expandos to xray");
51 win["1000a"] = "foopy";
52 ok("1000a" in win, "Should be able to add named expandos to xray");
54 SimpleTest.finish();
57 ]]></script>
58 </window>