| Index: LayoutTests/fast/history/state-object-few-arguements-exception.html
|
| diff --git a/LayoutTests/fast/history/state-object-few-arguements-exception.html b/LayoutTests/fast/history/state-object-few-arguements-exception.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..847972adc49135605267e2613f99e200904dae67
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/history/state-object-few-arguements-exception.html
|
| @@ -0,0 +1,37 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script>
|
| +
|
| +if (window.testRunner) {
|
| + testRunner.clearBackForwardList();
|
| + testRunner.dumpAsText();
|
| +}
|
| +
|
| +function runPushStateTest()
|
| +{
|
| + shouldThrow('history.pushState()', '"TypeError: Failed to execute \'pushState\' on \'History\': Not enough arguments to History.pushState."');
|
| + shouldThrow('history.pushState(null)', '"TypeError: Failed to execute \'pushState\' on \'History\': Not enough arguments to History.pushState."');
|
| + shouldNotThrow('history.pushState(null, null)');
|
| + shouldNotThrow('history.pushState(null, null, null)');
|
| +}
|
| +
|
| +function runReplaceStateTest()
|
| +{
|
| + shouldThrow('history.replaceState()', '"TypeError: Failed to execute \'replaceState\' on \'History\': Not enough arguments to History.replaceState."');
|
| + shouldThrow('history.replaceState(null)', '"TypeError: Failed to execute \'replaceState\' on \'History\': Not enough arguments to History.replaceState."');
|
| + shouldNotThrow('history.replaceState(null, null)');
|
| + shouldNotThrow('history.replaceState(null, null, null)');
|
| +}
|
| +
|
| +function runTest()
|
| +{
|
| + description('This test makes sure that calls to pushState() and replaceState() with less than 2 arguments fail as expected.');
|
| + runPushStateTest();
|
| + runReplaceStateTest();
|
| +}
|
| +
|
| +</script>
|
| +<body onload="runTest();">
|
| +<div id=console></div>
|
| +</body>
|
| +</html>
|
|
|