docshell/test/navigation/file_fragment_handling_during_load.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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