Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/encoding/utf-16-lone-surrogates.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/encoding/utf-16-lone-surrogates.html b/third_party/WebKit/LayoutTests/fast/encoding/utf-16-lone-surrogates.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..58371e9b5b9381ac4b675943e5c43b8ebfdc87d1 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/encoding/utf-16-lone-surrogates.html |
| @@ -0,0 +1,21 @@ |
| +<!DOCTYPE html> |
| +<script src="../../resources/js-test.js"></script> |
| +<script src="resources/char-decoding-utils.js"></script> |
| +<script> |
| + |
| +description("Test encoding behavior for lone UTF-16 surrogates"); |
|
foolip
2016/09/30 22:59:41
Are these testing something in addition to wpt? Ca
jsbell
2016/09/30 23:52:13
Copied for consistency with other tests in the sam
|
| + |
| +// Trailing U+0000 is used to force the encoder to process a buffered |
| +// lead surrogate since flushing does not occur at the end of streams. |
| + |
| +testDecode('utf-16', '%69%D8%D6%DE%00%00', 'U+D869/U+DED6/U+0000'); |
| +testDecode('utf-16', '%D6%DE%69%D8%00%00', 'U+FFFD/U+FFFD/U+0000'); |
| +testDecode('utf-16', '%69%D8%00%00', 'U+FFFD/U+0000'); |
| +testDecode('utf-16', '%D6%DE%00%00', 'U+FFFD/U+0000'); |
| + |
| +testDecode('utf-16be', '%D8%69%DE%D6%00%00', 'U+D869/U+DED6/U+0000'); |
| +testDecode('utf-16be', '%DE%D6%D8%69%00%00', 'U+FFFD/U+FFFD/U+0000'); |
| +testDecode('utf-16be', '%D8%69%00%00', 'U+FFFD/U+0000'); |
| +testDecode('utf-16be', '%DE%D6%00%00', 'U+FFFD/U+0000'); |
| + |
| +</script> |