blob: ba98911251338880a9780f3e03531fd137dad565 [file] [log] [blame] [edit]
<script>
if (window.testRunner) { testRunner.dumpAsText() }
var decoder = new TextDecoder('utf-8');
decoder.decode(new Uint8Array(0x7fffffff), { stream: true });
try { decoder.decode(new Uint8Array(1), { stream: true }) } catch (e) { console.log('error ' + e) }
console.log('stream decoded string from empty array with length 0x7fffffff');
try { decoder.decode(new Uint8Array(0x80000000)) } catch (e) { console.log('error ' + e) }
console.log('stream decoded string from empty array with length 0x80000000');
</script>