docshell/test/navigation/file_fragment_handling_during_load.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <html>
     2   <head>
     3     <script>
     4       var timerID = 0;
     5       function testDone() {
     6         clearTimeout(timerID);
     7         var l = document.body.firstChild.contentWindow.location.href;
     8         opener.is(l, "data:text/html,bar", "Should have loaded a new document");
     9         opener.nextTest();
    10         window.close();
    11       }
    12       function test() {
    13         var ifr = document.getElementsByTagName("iframe")[0];
    14         ifr.onload = testDone;
    15         ifr.contentWindow.location.hash = "b";
    16         ifr.contentWindow.location.href = "data:text/html,bar";
    17         history.back();
    18         timerID = setTimeout(testDone, 2000);
    19       }
    20     </script>
    21   </head>
    22   <body onload="setTimeout(test, 0)"><iframe src="data:text/html,foo#a"></iframe>
    23   </body>
    24 </html>

mercurial