blob: c8f097a18a628c26d93c2d21a96754037be2fd72 [file] [log] [blame]
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.waitUntilDone();
}
function log(msg) {
document.getElementById("logger").innerHTML += msg + "<br>";
}
window.onload = function()
{
try {
for( var i = 0; i < 75; ++i ) {
history.pushState(0, 0, i.toString());
log("Successfully added item: " + i);
}
} catch (e) {
log(e);
}
openFrame();
}
function openFrame()
{
var iframe = document.createElement('iframe');
iframe.src = 'resources/pushstate-iframe.html'
document.body.appendChild(iframe);
}
</script>
<body>
Test should complete quickly and not crash.<br>
Test does pushStates both from the main frame and from an iframe and makes sure they both count against state object count limit.<br>
<button id="button" onclick="clicked();">Click to test pushState through a user gesture</button>
<div id="logger"></div>
</body>