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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/encoding/textdecoder-utf16-surrogates.html

Issue 1984023002: Move web-platform-tests to wpt (part 1 of 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Encoding API: UTF-16 surrogate handling</title> 2 <title>Encoding API: UTF-16 surrogate handling</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> 5 <script>
6 6
7 var bad = [ 7 var bad = [
8 { 8 {
9 encoding: 'utf-16le', 9 encoding: 'utf-16le',
10 input: [0x00, 0xd8], 10 input: [0x00, 0xd8],
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 assert_equals(new TextDecoder(t.encoding).decode(new Uint8Array(t.input) ), t.expected); 42 assert_equals(new TextDecoder(t.encoding).decode(new Uint8Array(t.input) ), t.expected);
43 }, t.encoding + ' - ' + t.name); 43 }, t.encoding + ' - ' + t.name);
44 test(function() { 44 test(function() {
45 assert_throws(new TypeError(), function() { 45 assert_throws(new TypeError(), function() {
46 new TextDecoder(t.encoding, {fatal: true}).decode(new Uint8Array(t.i nput)) 46 new TextDecoder(t.encoding, {fatal: true}).decode(new Uint8Array(t.i nput))
47 }); 47 });
48 }, t.encoding + ' - ' + t.name + ' (fatal flag set)'); 48 }, t.encoding + ' - ' + t.name + ' (fatal flag set)');
49 }); 49 });
50 50
51 </script> 51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698