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

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

Issue 143943017: Added Base64 support in TextEncoder and TextDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <script> 3 <script>
4 4
5 description("Test the Encoding API's use of encoding names"); 5 description("Test the Encoding API's use of encoding names");
6 6
7 debug("Encoding names are case insensitive"); 7 debug("Encoding names are case insensitive");
8 var encodings = [ 8 var encodings = [
9 { label: 'utf-8', encoding: 'utf-8' }, 9 { label: 'utf-8', encoding: 'utf-8' },
10 { label: 'utf-16', encoding: 'utf-16le' }, 10 { label: 'utf-16', encoding: 'utf-16le' },
11 { label: 'utf-16le', encoding: 'utf-16le' }, 11 { label: 'utf-16le', encoding: 'utf-16le' },
12 { label: 'utf-16be', encoding: 'utf-16be' }, 12 { label: 'utf-16be', encoding: 'utf-16be' },
13 { label: 'ascii', encoding: 'windows-1252' }, 13 { label: 'ascii', encoding: 'windows-1252' },
14 { label: 'iso-8859-1', encoding: 'windows-1252' } 14 { label: 'iso-8859-1', encoding: 'windows-1252' },
15 { label: 'base64', encoding: 'base64' }
15 ]; 16 ];
16 17
17 // encoding-labels.html tests the full set of names/labels; this test just 18 // encoding-labels.html tests the full set of names/labels; this test just
18 // exercises some common cases and case-insensitivity. 19 // exercises some common cases and case-insensitivity.
19 20
20 encodings.forEach(function(test) { 21 encodings.forEach(function(test) {
21 shouldBeEqualToString("new TextDecoder('" + test.label.toLowerCase() + "').e ncoding", test.encoding); 22 shouldBeEqualToString("new TextDecoder('" + test.label.toLowerCase() + "').e ncoding", test.encoding);
22 shouldBeEqualToString("new TextDecoder('" + test.label.toUpperCase() + "').e ncoding", test.encoding); 23 shouldBeEqualToString("new TextDecoder('" + test.label.toUpperCase() + "').e ncoding", test.encoding);
23 }); 24 });
24 25
25 </script> 26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698