OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p id="description"></p> | 7 <p id="description"></p> |
8 <pre id="console"></pre> | 8 <pre id="console"></pre> |
9 <script> | 9 <script> |
10 description('Checks that session history traversal is done asynchronously.'); | 10 description('Checks that session history traversal is done asynchronously.'); |
11 | 11 |
12 onload = function() | 12 onload = function() |
13 { | 13 { |
14 // Make sure that we can generate history entries | 14 // Make sure that we can generate history entries |
15 setTimeout(runTest, 0); | 15 setTimeout(runTest, 0); |
16 } | 16 } |
17 | 17 |
18 function runTest() | 18 function runTest() |
19 { | 19 { |
20 location.hash = '#state1'; | 20 location.hash = '#state1'; |
21 history.back(); | 21 history.back(); |
22 // If history.back() is asychronous, then the location won't have been | 22 // If history.back() is asychronous, then the location won't have been |
23 // updated yet. | 23 // updated yet. |
24 shouldBe('location.hash', '"#state1"'); | 24 shouldBe('location.hash', '"#state1"'); |
25 | 25 |
26 finishJSTest(); | 26 finishJSTest(); |
27 } | 27 } |
28 var jsTestIsAsync = true; | 28 var jsTestIsAsync = true; |
29 </script> | 29 </script> |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |