Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / chrome / test_bug1124898.html
blob0b6c2b7451dbcc711d2c8e208b808a4bbc6b8943
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=1124898
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 1124898</title>
9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="chrome://global/skin"/>
11 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
12 <script type="application/javascript">
14 /** Test for Bug 1124898 **/
15 SimpleTest.waitForExplicitFinish();
16 (async () => {
17 await SpecialPowers.pushPrefEnv({"set": [["security.allow_eval_with_system_principal", true]]});
19 SimpleTest.expectAssertions(0, 1); // Dumb unrelated widget assertion - see bug 1126023.
21 var w = window.browsingContext.topChromeWindow.open("about:blank", "w", "chrome");
22 is(w.eval('typeof getAttention'), 'function', 'getAttention exists on regular chrome window');
23 is(w.eval('typeof messageManager'), 'object', 'messageManager exists on regular chrome window');
24 var contentURL = "https://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html";
25 w.location = contentURL;
26 tryWindow();
28 function tryWindow() {
29 if (w.document.title != 'empty test page') {
30 info("Document not loaded yet - retrying");
31 SimpleTest.executeSoon(tryWindow);
32 return;
34 is(w.eval('typeof getAttention'), 'undefined', 'getAttention doesnt exist on content-in-chrome window');
35 is(w.eval('typeof messageManager'), 'undefined', 'messageManager doesnt exist on content-in-chrome window');
36 w.close();
37 SimpleTest.finish();
39 })();
41 </script>
42 </head>
43 <body>
44 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1124898">Mozilla Bug 1124898</a>
45 <p id="display"></p>
46 <div id="content" style="display: none">
48 </div>
49 <pre id="test">
50 </pre>
51 </body>
52 </html>