Backed out changeset 713114c0331a (bug 1938707) by developer request CLOSED TREE
[gecko.git] / js / xpconnect / tests / mochitest / test_bug589028.html
blob2cd0d15ebbe308dd05a12d97b0a95196f0e3eb29
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=589028
5 -->
6 <head>
7 <title>Test for Bug 589028</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=589028">Mozilla Bug 589028</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
15 </div>
16 <pre id="test">
17 <script>
19 /** Test for Bug 589028 **/
20 SimpleTest.waitForExplicitFinish();
21 var p = 0;
22 function go() {
23 var ifr = $('ifr');
24 var ifrwin = ifr.contentWindow;
25 var ifrdoc = ifr.contentDocument;
27 o1 = new ifrwin.Option();
28 is(o1.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe");
30 o2 = ifrwin.getMyOption();
31 is(o2.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe");
33 o3 = ifrwin.getCallersOption(this);
34 is(o3.ownerDocument, document);
36 a1 = new ifrwin.Audio();
37 is(a1.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe");
39 a2 = ifrwin.getMyAudio();
40 is(a2.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe");
42 a3 = ifrwin.getCallersAudio(this);
43 is(a3.ownerDocument, document);
45 i1 = new ifrwin.Image();
46 is(i1.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe");
48 i2 = ifrwin.getMyImage();
49 is(i2.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe");
51 i3 = ifrwin.getCallersImage(this);
52 is(i3.ownerDocument, document);
54 SimpleTest.finish();
58 </script>
59 </pre>
60 <iframe src="bug589028_helper.html" id="ifr" onload="go()"></iframe>
61 </body>
62 </html>