4 https://bugzilla.mozilla.org/show_bug.cgi?id=1124898
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();
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;
28 function tryWindow() {
29 if (w.document.title != 'empty test page') {
30 info(
"Document not loaded yet - retrying");
31 SimpleTest.executeSoon(tryWindow);
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');
44 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1124898">Mozilla Bug
1124898</a>
46 <div id=
"content" style=
"display: none">