js/xpconnect/tests/mochitest/test_bug589028.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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>
    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();
    55 }
    58 </script>
    59 </pre>
    60 <iframe src="bug589028_helper.html" id="ifr" onload="go()"></iframe>
    61 </body>
    62 </html>

mercurial