OLD | NEW |
1 | 1 |
2 <html> | 2 <html> |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <body style="min-width: 5000px; min-height: 5000px"> | 4 <body style="min-width: 5000px; min-height: 5000px"> |
5 <script> | 5 <script> |
6 description('Checks that the popstate event fires when dispatched via createEven
t'); | 6 description('Checks that the popstate event fires when dispatched via createEven
t'); |
7 | 7 |
8 onpopstate = function(event) | 8 onpopstate = function(event) |
9 { | 9 { |
10 if(!!event.state && !!event.state.testValue) | 10 if(!!event.state && !!event.state.testValue) |
11 { | 11 { |
12 testPassed('Popstate state: (' + event.state.testValue +')'); | 12 testPassed('Popstate state: (' + event.state.testValue +')'); |
13 } | 13 } |
14 } | 14 } |
15 | 15 |
16 onload = function() | 16 onload = function() |
17 { | 17 { |
18 var evt = new PopStateEvent('popstate', { | 18 var evt = new PopStateEvent('popstate', { |
19 bubbles: false, | 19 bubbles: false, |
20 cancelable: false, | 20 cancelable: false, |
21 state: { testValue: 'Success' } | 21 state: { testValue: 'Success' } |
22 }); | 22 }); |
23 window.dispatchEvent(evt); | 23 window.dispatchEvent(evt); |
24 } | 24 } |
25 | 25 |
26 setTimeout(finishJSTest, 500); | 26 setTimeout(finishJSTest, 500); |
27 var jsTestIsAsync = true; | 27 var jsTestIsAsync = true; |
28 </script> | 28 </script> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |