| <html> |
| <head> |
| <script src="resources/cross-frame-access.js"></script> |
| </head> |
| <body> |
| <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get-test.html" style=""></iframe> |
| <pre id="console"></pre> |
| <script> |
| |
| window.targetWindow = frames[0]; |
| |
| window.onload = function() |
| { |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| |
| log("\n----- tests for getting/setting window.history and its properties -----\n"); |
| |
| // history object |
| log("Firefox prohibits getting 'history.length' but that seems unnecessarily strict since you're allowed to use the 'history' object."); |
| shouldBeTrue("canGet('targetWindow.history.length')"); |
| |
| shouldBeTrue("canGet('targetWindow.history.back')"); |
| shouldBeTrue("canGet('targetWindow.history.forward')"); |
| shouldBeTrue("canGet('targetWindow.history.go')"); |
| shouldBeTrue("canCall('targetWindow.history.back')"); |
| shouldBeTrue("canCall('targetWindow.history.forward')"); |
| shouldBeTrue("canCall('targetWindow.history.go', '-1')"); |
| |
| shouldBeTrue("canGet('targetWindow.history.toString')"); |
| shouldBe("toString('targetWindow.history')", "'[object History]'"); |
| |
| // Work around DRT bug that causes subsequent tests to fail. |
| window.stop(); |
| } |
| </script> |
| </body> |
| </html> |