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

Side by Side Diff: LayoutTests/fast/encoding/api/basics-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
1 This tests the basics of the Encoding API. 1 This is a testharness.js-based test.
2 PASS Encoding API basics
3 Harness: the test ran to completion.
2 4
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ".
4
5
6 PASS 'TextEncoder' in window is true
7 PASS 'TextDecoder' in window is true
8 PASS 'encoding' in new TextEncoder is true
9 PASS 'encoding' in new TextDecoder is true
10 PASS typeof (new TextEncoder).encoding is "string"
11 PASS typeof (new TextDecoder).encoding is "string"
12 PASS 'encode' in new TextEncoder is true
13 PASS 'decode' in new TextDecoder is true
14 PASS typeof (new TextEncoder).encode is "function"
15 PASS typeof (new TextDecoder).decode is "function"
16 PASS (new TextEncoder).encoding is "utf-8"
17 PASS (new TextDecoder).encoding is "utf-8"
18
19 test encode/decode sample - utf-8
20 encoded = new TextEncoder('utf-8').encode("z¢水𝄞􏿽")
21 PASS JSON.stringify(toArray(encoded)) is "[122,194,162,230,176,180,240,157,132,1 58,244,143,191,189]"
22 PASS new TextDecoder('utf-8').decode(new Uint8Array([122,194,162,230,176,180,240 ,157,132,158,244,143,191,189])) is "z¢水𝄞􏿽"
23
24 test encode/decode sample - utf-16le
25 encoded = new TextEncoder('utf-16le').encode("z¢水𝄞􏿽")
26 PASS JSON.stringify(toArray(encoded)) is "[122,0,162,0,52,108,52,216,30,221,255, 219,253,223]"
27 PASS new TextDecoder('utf-16le').decode(new Uint8Array([122,0,162,0,52,108,52,21 6,30,221,255,219,253,223])) is "z¢水𝄞􏿽"
28
29 test encode/decode sample - utf-16be
30 encoded = new TextEncoder('utf-16be').encode("z¢水𝄞􏿽")
31 PASS JSON.stringify(toArray(encoded)) is "[0,122,0,162,108,52,216,52,221,30,219, 255,223,253]"
32 PASS new TextDecoder('utf-16be').decode(new Uint8Array([0,122,0,162,108,52,216,5 2,221,30,219,255,223,253])) is "z¢水𝄞􏿽"
33
34 test encode/decode sample - utf-16
35 encoded = new TextEncoder('utf-16').encode("z¢水𝄞􏿽")
36 PASS JSON.stringify(toArray(encoded)) is "[122,0,162,0,52,108,52,216,30,221,255, 219,253,223]"
37 PASS new TextDecoder('utf-16').decode(new Uint8Array([122,0,162,0,52,108,52,216, 30,221,255,219,253,223])) is "z¢水𝄞􏿽"
38 PASS successfullyParsed is true
39
40 TEST COMPLETE
41
OLDNEW
« no previous file with comments | « LayoutTests/fast/encoding/api/basics.html ('k') | LayoutTests/fast/encoding/api/byte-order-marks.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698