Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/encoding/utf-16-lone-surrogates.html

Issue 2379333003: UTF-16 Decoder: Convert unpaired surrogates to replacement characters (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <script src="resources/char-decoding-utils.js"></script>
4 <script>
5
6 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
7
8 // Trailing U+0000 is used to force the encoder to process a buffered
9 // lead surrogate since flushing does not occur at the end of streams.
10
11 testDecode('utf-16', '%69%D8%D6%DE%00%00', 'U+D869/U+DED6/U+0000');
12 testDecode('utf-16', '%D6%DE%69%D8%00%00', 'U+FFFD/U+FFFD/U+0000');
13 testDecode('utf-16', '%69%D8%00%00', 'U+FFFD/U+0000');
14 testDecode('utf-16', '%D6%DE%00%00', 'U+FFFD/U+0000');
15
16 testDecode('utf-16be', '%D8%69%DE%D6%00%00', 'U+D869/U+DED6/U+0000');
17 testDecode('utf-16be', '%DE%D6%D8%69%00%00', 'U+FFFD/U+FFFD/U+0000');
18 testDecode('utf-16be', '%D8%69%00%00', 'U+FFFD/U+0000');
19 testDecode('utf-16be', '%DE%D6%00%00', 'U+FFFD/U+0000');
20
21 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698