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

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

Issue 1196733003: Remove duplicate Encoding API tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Encoding API: TextEncoder labels and whitespace</title> 2 <title>Encoding API: TextEncoder labels and whitespace</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 src="resources/shared.js"></script> 5 <script src="resources/encodings.js"></script>
6 <script> 6 <script>
7 var tests = [], failure_tests = []; 7 var tests = [], failure_tests = [];
8 setup(function() { 8 setup(function() {
9 var whitespace = [' ', '\t', '\n', '\f', '\r']; 9 var whitespace = [' ', '\t', '\n', '\f', '\r'];
10 var bad_whitespace = ['\u000B', '\u00A0', '\u2028', '\u2029']; 10 var bad_whitespace = ['\u000B', '\u00A0', '\u2028', '\u2029'];
11 encodings_table.forEach(function(section) { 11 encodings_table.forEach(function(section) {
12 section.encodings.filter(function(encoding) { 12 section.encodings.filter(function(encoding) {
13 return utf_encodings.indexOf(encoding.name) !== -1; 13 return utf_encodings.indexOf(encoding.name) !== -1;
14 }).forEach(function(encoding) { 14 }).forEach(function(encoding) {
15 var name = encoding.name; 15 var name = encoding.name;
(...skipping 26 matching lines...) Expand all
42 42
43 failure_tests.forEach(function(t) { 43 failure_tests.forEach(function(t) {
44 var input = t[0], output = t[1]; 44 var input = t[0], output = t[1];
45 test(function() { 45 test(function() {
46 assert_throws({name:'RangeError'}, 46 assert_throws({name:'RangeError'},
47 function() { new TextEncoder(input); }, 47 function() { new TextEncoder(input); },
48 'non-ASCII whitespace should not be stripped'); 48 'non-ASCII whitespace should not be stripped');
49 }, format_value(input) + " => " + format_value(output)); 49 }, format_value(input) + " => " + format_value(output));
50 }); 50 });
51 </script> 51 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/encoding/api/textdecoder-labels.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