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

Side by Side Diff: LayoutTests/fast/encoding/api/encoding-names.html

Issue 15901002: Implement Encoding API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline webexposed global constructor tests Created 7 years, 4 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 <!DOCTYPE html>
2 <script src="../../js/resources/js-test-pre.js"></script>
3 <script>
4
5 description("Test the Encoding API's use of encoding names");
6
7 debug("Encoding names are case insensitive");
8 var encodings = [
9 { label: 'utf-8', encoding: 'utf-8' },
10 { label: 'utf-16', encoding: 'utf-16' },
11 { label: 'utf-16le', encoding: 'utf-16' },
12 { label: 'utf-16be', encoding: 'utf-16be' },
13 { label: 'ascii', encoding: 'windows-1252' },
14 { label: 'iso-8859-1', encoding: 'windows-1252' }
15 ];
16
17 // FIXME: Include full table from spec
18
19 encodings.forEach(function(test) {
20 shouldBeEqualToString("new TextDecoder('" + test.label.toLowerCase() + "').e ncoding", test.encoding);
21 shouldBeEqualToString("new TextDecoder('" + test.label.toUpperCase() + "').e ncoding", test.encoding);
22 });
23
24
25 shouldBeEqualToString("new TextDecoder('utf-8').encoding", "utf-8"); // canonica l case
26 shouldBeEqualToString("new TextDecoder('UTF-16').encoding", "utf-16"); // canoni cal case and name
27 shouldBeEqualToString("new TextDecoder('UTF-16BE').encoding", "utf-16be"); // ca nonical case and name
28 shouldBeEqualToString("new TextDecoder('iso8859-1').encoding", "windows-1252"); // canonical case and name
29 shouldBeEqualToString("new TextDecoder('iso-8859-1').encoding", "windows-1252"); // canonical case and name
30
31 </script>
32 <script src="../../js/resources/js-test-post.js"></script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/encoding/api/byte-order-marks-expected.txt ('k') | LayoutTests/fast/encoding/api/encoding-names-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698