2 <script src="../../../resources/js-test.js"></script>
5 description("Edge cases around non-fatal errors at EOF");
7 shouldThrow("new TextDecoder('utf-8', {fatal: true}).decode(new Uint8Array([0xff]))");
10 debug("Should not throw or hang:");
11 evalAndLog("new TextDecoder('utf-8').decode(new Uint8Array([0xff]))");
14 shouldThrow("new TextDecoder('utf-16le', {fatal: true}).decode(new Uint8Array([0x00]))");
17 debug("Should not throw or hang:");
18 evalAndLog("new TextDecoder('utf-16le').decode(new Uint8Array([0x00]))");
21 shouldThrow("new TextDecoder('utf-16be', {fatal: true}).decode(new Uint8Array([0x00]))");
24 debug("Should not throw or hang:");
25 evalAndLog("new TextDecoder('utf-16be').decode(new Uint8Array([0x00]));");