| Index: LayoutTests/fast/encoding/char-decoding-truncated.html
|
| diff --git a/LayoutTests/fast/encoding/char-decoding-truncated.html b/LayoutTests/fast/encoding/char-decoding-truncated.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9e6c05df16cb58bcf522a72720c8c1e9dbbab3b7
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/encoding/char-decoding-truncated.html
|
| @@ -0,0 +1,31 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script src="resources/char-decoding-utils.js"></script>
|
| +<script>
|
| +
|
| +description("Test encoding behavior for truncated sequences");
|
| +
|
| +// UTF-8 codec emits replacement characters
|
| +testDecode('utf-8', '%E2%88%9A', 'U+221A');
|
| +testDecode('utf-8', '%E2%88', 'U+FFFD/U+FFFD');
|
| +testDecode('utf-8', '%E2', 'U+FFFD');
|
| +
|
| +// UTF-16 codec does not emit replacement characters
|
| +testDecode('utf-16', '%69%D8%D6%DE', 'U+D869/U+DED6');
|
| +testDecode('utf-16', '%69%D8%D6', 'U+D869');
|
| +testDecode('utf-16', '%69%D8', 'U+D869');
|
| +testDecode('utf-16', '%69', '');
|
| +testDecode('utf-16be', '%D8%69%DE%D6', 'U+D869/U+DED6');
|
| +testDecode('utf-16be', '%D8%69%DE', 'U+D869');
|
| +testDecode('utf-16be', '%D8%69', 'U+D869');
|
| +testDecode('utf-16be', '%D8', '');
|
| +
|
| +// Other codecs emit replacement characters
|
| +testDecode('gb2312', '%A3%A0', 'U+3000');
|
| +testDecode('gb2312', '%A3', 'U+FFFD');
|
| +testDecode('shift_jis', '%82%d0', 'U+3072');
|
| +testDecode('shift_jis', '%82', 'U+001A');
|
| +testDecode('windows-949', '%A2%E6', 'U+20AC');
|
| +testDecode('windows-949', '%A2', 'U+FFFD');
|
| +
|
| +</script>
|
|
|