navigation-while-deferring-loads.html 812 Bytes
Newer Older
1 2
<html>
<script>
3 4 5
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
6 7 8 9
}
function run() {
    if (history.length > 1) {
        document.body.innerHTML = 'PASS';
10 11
        if (window.testRunner)
          testRunner.notifyDone();
12 13 14 15 16 17 18 19 20
        return;
    }
    var evt = document.createEvent("MouseEvents"); 
    evt.initMouseEvent("click", true, true, window,
      0, 0, 0, 0, 0, false, false, false, false, 0, null); 
    document.getElementById('anchor').dispatchEvent(evt);
}
</script>
<body onload='run()'>
21
    <a id='anchor' href='data:text/html,<script>function deferCallbacks(defer){testRunner.setDefersLoading(defer)}</script><body onload="if(window.testRunner){deferCallbacks(true);testRunner.goBack();deferCallbacks(false)}">FAIL</body>'>go to second page</a>
22 23
</body>
</html>