docshell/test/test_bug660404.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=660404
     5 -->
     6 <head>
     7   <title>Test for Bug 660404</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=660404">Mozilla Bug 660404</a>
    13 <p id="display"></p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script type="application/javascript">
    20 /** Test for Bug 660404 **/
    21 SimpleTest.waitForExplicitFinish();
    23 var w;
    25 function continueTest() {
    26   // Do this async so the load event can finish firing
    27   SimpleTest.executeSoon(function() {
    28     w.onpagehide = function(ev) {
    29       is(ev.persisted, true, "Should be bfcached when navigating to multipart");
    30     }
    31     w.location.href = "file_bug660404";
    32   });
    33 }
    35 function finishTest() {
    36   is(w.document.documentElement.textContent, "opener.finishTest();");
    37   is(w.document.documentElement.innerHTML, "<head><script>opener.finishTest();</"+"script></head>");
    38   w.close();
    39   SimpleTest.finish();
    40 }
    42 // Have to open a new window, since there's no bfcache in subframes
    43 w = window.open("data:text/html,<script>window.onload = function() { opener.continueTest(); }</"+"script>");
    45 </script>
    46 </pre>
    47 </body>
    48 </html>

mercurial