| Index: LayoutTests/fast/encoding/api/end-of-file.html
|
| diff --git a/LayoutTests/fast/encoding/api/end-of-file.html b/LayoutTests/fast/encoding/api/end-of-file.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b4ecb5a5d780a366f6bcffd293934b9aef10ee41
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/encoding/api/end-of-file.html
|
| @@ -0,0 +1,28 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../js/resources/js-test-pre.js"></script>
|
| +<script>
|
| +
|
| +description("Edge cases around non-fatal errors at EOF");
|
| +
|
| +shouldThrow("new TextDecoder('utf-8', {fatal: true}).decode(new Uint8Array([0xff]))");
|
| +
|
| +debug("");
|
| +debug("Should not throw or hang:");
|
| +evalAndLog("new TextDecoder('utf-8').decode(new Uint8Array([0xff]))");
|
| +
|
| +debug("");
|
| +shouldThrow("new TextDecoder('utf-16', {fatal: true}).decode(new Uint8Array([0x00]))");
|
| +
|
| +debug("");
|
| +debug("Should not throw or hang:");
|
| +evalAndLog("new TextDecoder('utf-16').decode(new Uint8Array([0x00]))");
|
| +
|
| +debug("");
|
| +shouldThrow("new TextDecoder('utf-16be', {fatal: true}).decode(new Uint8Array([0x00]))");
|
| +
|
| +debug("");
|
| +debug("Should not throw or hang:");
|
| +evalAndLog("new TextDecoder('utf-16be').decode(new Uint8Array([0x00]));");
|
| +
|
| +</script>
|
| +<script src="../../js/resources/js-test-post.js"></script>
|
|
|