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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/encoding/char-decoding-truncated.html

Issue 2379333003: UTF-16 Decoder: Convert unpaired surrogates to replacement characters (Closed)
Patch Set: Rebase, switch test to testharness 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/encoding/utf-16-lone-surrogates.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Character Decoding - Truncated Sequences</title> 2 <title>Character Decoding - Truncated Sequences</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="resources/char-decoding-utils.js"></script> 5 <script src="resources/char-decoding-utils.js"></script>
6 <script> 6 <script>
7 7
8 // UTF-8 codec emits replacement characters 8 // UTF-8 codec emits replacement characters
9 testDecode('utf-8', '%E2%88%9A', 'U+221A'); 9 testDecode('utf-8', '%E2%88%9A', 'U+221A');
10 testDecode('utf-8', '%E2%88', 'U+FFFD/U+FFFD'); 10 testDecode('utf-8', '%E2%88', 'U+FFFD/U+FFFD');
11 testDecode('utf-8', '%E2', 'U+FFFD'); 11 testDecode('utf-8', '%E2', 'U+FFFD');
12 12
13 // UTF-16 codec does not emit replacement characters 13 // UTF-16 codec does not emit replacement characters
14 testDecode('utf-16', '%69%D8%D6%DE', 'U+D869/U+DED6'); 14 testDecode('utf-16', '%69%D8%D6%DE', 'U+D869/U+DED6');
15 testDecode('utf-16', '%69%D8%D6', 'U+D869'); 15 testDecode('utf-16', '%69%D8%D6', '');
16 testDecode('utf-16', '%69%D8', 'U+D869'); 16 testDecode('utf-16', '%69%D8', '');
17 testDecode('utf-16', '%69', ''); 17 testDecode('utf-16', '%69', '');
18 testDecode('utf-16be', '%D8%69%DE%D6', 'U+D869/U+DED6'); 18 testDecode('utf-16be', '%D8%69%DE%D6', 'U+D869/U+DED6');
19 testDecode('utf-16be', '%D8%69%DE', 'U+D869'); 19 testDecode('utf-16be', '%D8%69%DE', '');
20 testDecode('utf-16be', '%D8%69', 'U+D869'); 20 testDecode('utf-16be', '%D8%69', '');
21 testDecode('utf-16be', '%D8', ''); 21 testDecode('utf-16be', '%D8', '');
22 22
23 // Other codecs emit replacement characters 23 // Other codecs emit replacement characters
24 testDecode('gb2312', '%A3%A0', 'U+3000'); 24 testDecode('gb2312', '%A3%A0', 'U+3000');
25 testDecode('gb2312', '%A3', 'U+FFFD'); 25 testDecode('gb2312', '%A3', 'U+FFFD');
26 testDecode('shift_jis', '%82%d0', 'U+3072'); 26 testDecode('shift_jis', '%82%d0', 'U+3072');
27 testDecode('shift_jis', '%82', 'U+FFFD'); 27 testDecode('shift_jis', '%82', 'U+FFFD');
28 testDecode('windows-949', '%A2%E6', 'U+20AC'); 28 testDecode('windows-949', '%A2%E6', 'U+20AC');
29 testDecode('windows-949', '%A2', 'U+FFFD'); 29 testDecode('windows-949', '%A2', 'U+FFFD');
30 30
31 </script> 31 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/encoding/utf-16-lone-surrogates.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698