|
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 type="application/javascript" 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> |
|
18 |
|
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; |
|
26 |
|
27 o1 = new ifrwin.Option(); |
|
28 is(o1.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe"); |
|
29 |
|
30 o2 = ifrwin.getMyOption(); |
|
31 is(o2.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe"); |
|
32 |
|
33 o3 = ifrwin.getCallersOption(this); |
|
34 is(o3.ownerDocument, document); |
|
35 |
|
36 a1 = new ifrwin.Audio(); |
|
37 is(a1.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe"); |
|
38 |
|
39 a2 = ifrwin.getMyAudio(); |
|
40 is(a2.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe"); |
|
41 |
|
42 a3 = ifrwin.getCallersAudio(this); |
|
43 is(a3.ownerDocument, document); |
|
44 |
|
45 i1 = new ifrwin.Image(); |
|
46 is(i1.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe"); |
|
47 |
|
48 i2 = ifrwin.getMyImage(); |
|
49 is(i2.ownerDocument, ifrdoc, "ownerDocument doesn't match iframe"); |
|
50 |
|
51 i3 = ifrwin.getCallersImage(this); |
|
52 is(i3.ownerDocument, document); |
|
53 |
|
54 SimpleTest.finish(); |
|
55 } |
|
56 |
|
57 |
|
58 </script> |
|
59 </pre> |
|
60 <iframe src="bug589028_helper.html" id="ifr" onload="go()"></iframe> |
|
61 </body> |
|
62 </html> |