| OLD | NEW |
| 1 <head> | 1 <head> |
| 2 </head> | 2 </head> |
| 3 <body onload="onload()"> | 3 <body onload="onload()"> |
| 4 </body> | 4 </body> |
| 5 <script> | 5 <script> |
| 6 if (window.testRunner) { | 6 if (window.testRunner) { |
| 7 testRunner.clearBackForwardList(); | 7 testRunner.clearBackForwardList(); |
| 8 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
| 9 } | 9 } |
| 10 | 10 |
| 11 function onload() { | 11 function onload() { |
| 12 // Navigate via an iframe redirect (to change the referrer, though we're | 12 // Navigate via an iframe redirect (to change the referrer, though we're |
| 13 // not interested in that in this test) should still generate a history | 13 // not interested in that in this test) should still generate a history |
| 14 // entry, since we're doing it after onload. | 14 // entry, since we're doing it after onload. |
| 15 window.setTimeout(navigate, 0); | 15 window.requestAnimationFrame(navigate); |
| 16 } | 16 } |
| 17 | 17 |
| 18 function navigate() | 18 function navigate() |
| 19 { | 19 { |
| 20 var redirectIframe = document.createElement('iframe'); | 20 var redirectIframe = document.createElement('iframe'); |
| 21 document.body.appendChild(redirectIframe); | 21 document.body.appendChild(redirectIframe); |
| 22 redirectIframe.src = 'resources/iframe-redirect.html#2'; | 22 redirectIframe.src = 'resources/iframe-redirect.html#2'; |
| 23 } | 23 } |
| 24 | 24 |
| 25 </script> | 25 </script> |
| 26 | 26 |
| OLD | NEW |