4 https://bugzilla.mozilla.org/show_bug.cgi?id=829872
8 <title>Test for Bug
829872</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
829872 and Bug
968003 **/
14 SimpleTest.waitForExplicitFinish();
18 if (++gLoadCount ==
3)
22 async function check(elem, desc) {
23 is(elem.contentDocument, null,
"null cross-origin contentDocument for " + desc);
24 ok(await SpecialPowers.spawn(elem, [], () =
> this.content.eval('frameElement === null;')),
25 "null cross-origin frameElement for " + desc);
26 if (!(elem instanceof elem.ownerDocument.defaultView.HTMLFrameElement))
27 is(elem.getSVGDocument(), null,
"null cross-origin getSVGDocument() for " + desc);
31 ok(true,
"Starting test");
32 await check($('ifr'),
"iframe element");
33 await check($('obj'),
"object element");
34 await check($('framesetholder').contentDocument.getElementById('fr'),
"frameset frame");
41 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=829872">Mozilla Bug
829872</a>
43 <div id=
"content" style=
"display: none">
48 <iframe id=
"ifr" onload=
"loaded();" src=
"http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></iframe>
49 <object id=
"obj" onload=
"loaded();" data=
"http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html"></object>
50 <iframe id=
"framesetholder" srcdoc=
"<html><head></head><frameset cols='100%'><frame id='fr' onload='parent.loaded();' src='http://example.org/tests/js/xpconnect/tests/mochitest/file_empty.html' /></frameset></html>"></iframe>