docshell/test/navigation/file_bug534178.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/test/navigation/file_bug534178.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +<html>
     1.5 +  <head>
     1.6 +    <script>
     1.7 +    
     1.8 +      function testDone() {
     1.9 +        document.body.removeChild(document.body.firstChild);
    1.10 +        var isOK = false;
    1.11 +        try {
    1.12 +          isOK = history.previous != location;
    1.13 +        } catch(ex) {
    1.14 +          // history.previous should throw if this is the first page in shistory.
    1.15 +          isOK = true;
    1.16 +        }
    1.17 +        document.body.textContent = isOK ? "PASSED" : "FAILED";
    1.18 +        opener.ok(isOK, "Duplicate session history transactions should have been removed!");
    1.19 +        opener.nextTest();
    1.20 +        window.close();
    1.21 +      }
    1.22 +      function ifrload() {
    1.23 +        setTimeout(testDone, 0);
    1.24 +      }
    1.25 +      function test() {
    1.26 +        var ifr = document.getElementsByTagName("iframe")[0];
    1.27 +        ifr.onload = ifrload;
    1.28 +        ifr.src = "data:text/html,doc2";
    1.29 +      }
    1.30 +    </script>
    1.31 +  </head>
    1.32 +  <body onload="setTimeout(test, 0)"><iframe src="data:text/html,doc1"></iframe>
    1.33 +  </body>
    1.34 +</html>

mercurial