blob: 9b0ab8d6fc365f516136ef199489093192a16a3b [file] [log] [blame]
<html>
<body>
The excessive length passed to Blob.slice() should be trapped and result in
a truncated slice being returned.
<pre id='console'></pre>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone()
}
var text = '';
for (var i = 0; i < 2000; ++i)
text += 'A';
blob = new Blob([text]);
slicedBlob = blob.slice(1999, 9223372036854775000);
document.getElementById('console').appendChild(document.createTextNode('Blob slice length: ' + slicedBlob.size));
if (slicedBlob.size != 1) {
document.getElementById('console').appendChild(document.createTextNode('FAIL'));
}
if (window.testRunner) {
testRunner.notifyDone();
}
</script>
</body>
</html>