Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / test_bug862380.html
blobd604e3d05fce0163f80a6da848738b675116e77d
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=862380
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 862380</title>
9 <script src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <script type="application/javascript">
13 /** Test for Bug 862380 **/
14 SimpleTest.waitForExplicitFinish();
15 function go() {
16 checkNotEnumerable($('ifr').contentWindow, true);
17 checkNotEnumerable($('ifr').contentWindow.location, false);
18 SimpleTest.finish();
21 function checkNotEnumerable(obj, isWindow) {
22 try {
23 const expectedWindow = ["0"];
24 const expectedLocation = [];
25 const expected = isWindow ? expectedWindow : expectedLocation;
26 is(Object.keys(obj).length, expected.length,
27 "Object.keys gives right array length");
28 var actual = [];
29 for (var i in obj)
30 actual.push(i);
31 is(actual.length, expected.length,
32 "Enumeration sees the right number of props");
33 actual.sort();
34 expected.sort();
35 for (var i = 0; i < actual.length; ++i)
36 is(actual[i], expected[i], "Arrays should be the same " + i);
37 } catch (e) {
38 ok(false, "threw: " + e);
42 </script>
43 </head>
44 <body>
45 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=862380">Mozilla Bug 862380</a>
46 <p id="display"></p>
47 <div id="content" style="display: none">
49 </div>
50 <iframe id="ifr" onload="go();" src="http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></iframe>
51 <pre id="test">
52 </pre>
53 </body>
54 </html>