| <script src="../../resources/js-test-pre.js"></script> |
| description('Verifies that we can go back and forward from the top level of a frame set where a window changes its name after the initial load.'); |
| testRunner.setCanOpenWindows(); |
| testRunner.waitUntilDone(); |
| testWindow = window.open('resources/history-subframe-with-name-container.html'); |
| testFailed('Could not open test window'); |
| 1: 'FRAME_LOADED_INITIAL', |
| 4: 'FRAME_LOADED_FORWARD' |
| function onFrameLoaded(pageId) |
| // The page ID is put in a global so that the eval() inside of shouldBe can |
| shouldBe('2', 'currentPageId'); |
| // Make sure we generate a history entry. |
| setTimeout(function() { testWindow.frames[0].location.href = 'resources/history-subframe-with-name-3.html' }, 0); |
| shouldBe('3', 'currentPageId'); |
| testWindow.history.back(); |
| shouldBe('2', 'currentPageId'); |
| testWindow.history.forward(); |
| shouldBe('3', 'currentPageId'); |
| testFailed('Should not be in state ' + currentState + ". currentPageId is " + currentPageId); |
| testPassed('Complete: navigated through all the states'); |