chromium/third_party/blink/web_tests/fast/history/state-object-few-arguements-exception.html

<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>

if (window.testRunner) {
    testRunner.clearBackForwardList();
    testRunner.dumpAsText();
}

function runPushStateTest()
{
    shouldThrow('history.pushState()');
    shouldThrow('history.pushState(null)');
    shouldNotThrow('history.pushState(null, null)');
    shouldNotThrow('history.pushState(null, null, null)');
}

function runReplaceStateTest()
{
    shouldThrow('history.replaceState()');
    shouldThrow('history.replaceState(null)');
    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>