docshell/test/navigation/file_bug534178.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 <html>
     2   <head>
     3     <script>
     5       function testDone() {
     6         document.body.removeChild(document.body.firstChild);
     7         var isOK = false;
     8         try {
     9           isOK = history.previous != location;
    10         } catch(ex) {
    11           // history.previous should throw if this is the first page in shistory.
    12           isOK = true;
    13         }
    14         document.body.textContent = isOK ? "PASSED" : "FAILED";
    15         opener.ok(isOK, "Duplicate session history transactions should have been removed!");
    16         opener.nextTest();
    17         window.close();
    18       }
    19       function ifrload() {
    20         setTimeout(testDone, 0);
    21       }
    22       function test() {
    23         var ifr = document.getElementsByTagName("iframe")[0];
    24         ifr.onload = ifrload;
    25         ifr.src = "data:text/html,doc2";
    26       }
    27     </script>
    28   </head>
    29   <body onload="setTimeout(test, 0)"><iframe src="data:text/html,doc1"></iframe>
    30   </body>
    31 </html>

mercurial