4 <script src="../js/resources/js-test-pre.js"></script>
7 <p id="description"></p>
8 <pre id="console"></pre>
10 <iframe src="resources/subframe.html" id="iframe1"></iframe>
13 description('Ensures that repeated back and forward work for frame hash navigations.');
15 var frame = document.getElementById("iframe1").contentWindow;
18 // Make sure that we can generate history entries
19 setTimeout(runTest, 0);
22 // 1. Navigate to hash "#foo".
23 // 2. Go back to hash "".
24 // 3. Go forward to hash "#foo".
27 frame.location.hash = "#foo";
30 frame.onhashchange = function()
32 if (frame.location.hash == "#foo") {
33 if (!window.localStorage.beenHere) {
34 window.localStorage.beenHere = true;
35 debug("First visit to foo.");
38 delete window.localStorage.beenHere;
39 debug("Gone forward.");
43 if (frame.location.hash == "") {
48 var jsTestIsAsync = true;
50 <script src="../js/resources/js-test-post.js"></script>