| <!DOCTYPE html> |
| <script> |
| if (testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function runTest() { |
| var loadCount = 2; |
| var didGoBack = false; |
| |
| var frame1 = document.getElementById('frame1'); |
| var frame2 = document.getElementById('frame2'); |
| frame1.onload = frame2.onload = function() { |
| loadCount--; |
| if (loadCount) |
| return; |
| |
| if (!didGoBack) { |
| // We've navigated both frames, now go back 2 steps. |
| loadCount = 2; |
| history.go(-2); |
| didGoBack = true; |
| return; |
| } |
| |
| if (testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| frame1.src = frame2.src = 'data:text/html,navigated'; |
| } |
| </script> |
| <body onload="setTimeout(runTest, 0)"> |
| <div>This tests that navigating two subframes and then going back using history.go(-2) won't assert.</div> |
| <iframe id='frame1' src='data:text/html,frame1'></iframe> |
| <iframe id='frame2' src='data:text/html,frame2'></iframe> |
| </body> |