OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <script> |
| 4 |
| 5 if (window.testRunner) { |
| 6 testRunner.clearBackForwardList(); |
| 7 testRunner.dumpAsText(); |
| 8 } |
| 9 |
| 10 function runPushStateTest() |
| 11 { |
| 12 shouldThrow('history.pushState()'); |
| 13 shouldThrow('history.pushState(null)'); |
| 14 shouldNotThrow('history.pushState(null, null)'); |
| 15 shouldNotThrow('history.pushState(null, null, null)'); |
| 16 } |
| 17 |
| 18 function runReplaceStateTest() |
| 19 { |
| 20 shouldThrow('history.replaceState()'); |
| 21 shouldThrow('history.replaceState(null)'); |
| 22 shouldNotThrow('history.replaceState(null, null)'); |
| 23 shouldNotThrow('history.replaceState(null, null, null)'); |
| 24 } |
| 25 |
| 26 function runTest() |
| 27 { |
| 28 description('This test makes sure that calls to pushState() and replaceState
() with less than 2 arguments fail as expected.'); |
| 29 runPushStateTest(); |
| 30 runReplaceStateTest(); |
| 31 } |
| 32 |
| 33 </script> |
| 34 <body onload="runTest();"> |
| 35 <div id=console></div> |
| 36 </body> |
| 37 </html> |
OLD | NEW |