docshell/test/navigation/file_fragment_handling_during_load.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/test/navigation/file_fragment_handling_during_load.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +<html>
     1.5 +  <head>
     1.6 +    <script>
     1.7 +      var timerID = 0;
     1.8 +      function testDone() {
     1.9 +        clearTimeout(timerID);
    1.10 +        var l = document.body.firstChild.contentWindow.location.href;
    1.11 +        opener.is(l, "data:text/html,bar", "Should have loaded a new document");
    1.12 +        opener.nextTest();
    1.13 +        window.close();
    1.14 +      }
    1.15 +      function test() {
    1.16 +        var ifr = document.getElementsByTagName("iframe")[0];
    1.17 +        ifr.onload = testDone;
    1.18 +        ifr.contentWindow.location.hash = "b";
    1.19 +        ifr.contentWindow.location.href = "data:text/html,bar";
    1.20 +        history.back();
    1.21 +        timerID = setTimeout(testDone, 2000);
    1.22 +      }
    1.23 +    </script>
    1.24 +  </head>
    1.25 +  <body onload="setTimeout(test, 0)"><iframe src="data:text/html,foo#a"></iframe>
    1.26 +  </body>
    1.27 +</html>

mercurial