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

Side by Side Diff: LayoutTests/fast/encoding/api/surrogate-pairs-expected.txt

Issue 240283013: Convert Encoding API tests to W3C testharness.js (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move UTF-16 surrogate tests to separate file Created 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 Test invalid UTF-16 surrogate pairs with UTF-8 encoding
2
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4
5
6 encoded = new TextEncoder('utf-8').encode('abc123')
7 PASS JSON.stringify([].slice.call(encoded)) is "[97,98,99,49,50,51]"
8
9 encoded = new TextEncoder('utf-8').encode('\ud800')
10 PASS JSON.stringify([].slice.call(encoded)) is "[239,191,189]"
11
12 encoded = new TextEncoder('utf-8').encode('\udc00')
13 PASS JSON.stringify([].slice.call(encoded)) is "[239,191,189]"
14
15 encoded = new TextEncoder('utf-8').encode('abc\ud800123')
16 PASS JSON.stringify([].slice.call(encoded)) is "[97,98,99,239,191,189,49,50,51]"
17
18 encoded = new TextEncoder('utf-8').encode('abc\udc00123')
19 PASS JSON.stringify([].slice.call(encoded)) is "[97,98,99,239,191,189,49,50,51]"
20
21 encoded = new TextEncoder('utf-8').encode('\udc00\ud800')
22 PASS JSON.stringify([].slice.call(encoded)) is "[239,191,189,239,191,189]"
23
24 PASS successfullyParsed is true
25
26 TEST COMPLETE
27
OLDNEW
« no previous file with comments | « LayoutTests/fast/encoding/api/surrogate-pairs.html ('k') | LayoutTests/fast/encoding/api/utf-round-trip.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698