dom/tests/mochitest/bugs/test_bug49312.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=49312
     5 -->
     6 <head>
     7   <title>Test for Bug 49312</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   <script>
    11     // Hack to set things up so that parent.fakeOpener works the same way for
    12     // both test subframes.
    13     var framesToLoad = 2;
    14     function subframeLoaded(win) {
    15       is(win.location.href
    16             .replace(/iframe_bug49312\.html$/, "test_bug49312.html"),
    17          window.location.href,
    18          "Unexpected subframe href");
    19       if (win == opened) {
    20         opened.close();
    21       }
    22       if (--framesToLoad == 0) {
    23         SimpleTest.finish();
    24       }
    25     }
    27   </script>
    28 </head>
    29 <body>
    30 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=49312">Mozilla Bug 49312</a>
    31 <p id="display">
    32   <iframe src="javascript:'<script>location=\'iframe_bug49312.html\'</script>'"></iframe>
    33 </p>
    34 <div id="content" style="display: none">
    36 </div>
    37 <pre id="test">
    38 <script type="application/javascript">
    40 /** Test for Bug 49312 **/
    41 SimpleTest.waitForExplicitFinish();
    42 var opened = window.open("javascript:'<script>location=\\\'iframe_bug49312.html\\\'</" + "script>'", "", "width=100,height=100")
    44 </script>
    45 </pre>
    46 </body>
    47 </html>

mercurial