OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head/> | 5 </head/> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("Make sure the same deserialization of the state object is used
every time (both in the history object and popstate events)."); | 8 description("Make sure the same deserialization of the state object is used
every time (both in the history object and popstate events)."); |
9 | 9 |
10 window.jsTestIsAsync = true; | 10 window.jsTestIsAsync = true; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Our stored reference to stateObject will not match the state object i
n this pop state event, as it is the same as history.state which is a structured
clone of the history item's state object. | 45 // Our stored reference to stateObject will not match the state object i
n this pop state event, as it is the same as history.state which is a structured
clone of the history item's state object. |
46 shouldBeTrue("popStateEvent.state !== stateObject"); | 46 shouldBeTrue("popStateEvent.state !== stateObject"); |
47 // The event's state object and the current state object should match. | 47 // The event's state object and the current state object should match. |
48 shouldBeTrue("popStateEvent.state === history.state"); | 48 shouldBeTrue("popStateEvent.state === history.state"); |
49 | 49 |
50 setTimeout(finishJSTest, 0); | 50 setTimeout(finishJSTest, 0); |
51 } | 51 } |
52 | 52 |
53 // Now let's go back to our original history entry which has a state object
that we've stored a reference to already. | 53 // Now let's go back to our original history entry which has a state object
that we've stored a reference to already. |
54 // This will fire our popstate event handler above. | 54 // This will fire our popstate event handler above. |
55 window.onload = function() { | 55 history.back(); |
56 history.back(); | |
57 }; | |
58 </script> | 56 </script> |
59 </body> | 57 </body> |
60 </html> | 58 </html> |
OLD | NEW |