| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Encoding API: Legacy encodings</title> | 2 <title>Encoding API: Legacy encodings</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/encodings.js"></script> | 5 <script src="resources/encodings.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 encodings_table.forEach(function(section) { | 8 encodings_table.forEach(function(section) { |
| 9 section.encodings.forEach(function(encoding) { | 9 section.encodings.forEach(function(encoding) { |
| 10 if (encoding.name !== 'replacement') { | 10 if (encoding.name !== 'replacement') { |
| 11 test(function() { | 11 test(function() { |
| 12 assert_equals(new TextDecoder(encoding.name).encoding, encoding.
name); | 12 assert_equals(new TextDecoder(encoding.name).encoding, encoding.
name); |
| 13 }, 'Encoding argument supported for decode: ' + encoding.name); | 13 }, 'Encoding argument supported for decode: ' + encoding.name); |
| 14 } | 14 } |
| 15 | 15 |
| 16 test(function() { | 16 test(function() { |
| 17 assert_equals(new TextEncoder(encoding.name).encoding, 'utf-8'); | 17 assert_equals(new TextEncoder(encoding.name).encoding, 'utf-8'); |
| 18 }, 'Encoding argument not considered for encode: ' + encoding.name); | 18 }, 'Encoding argument not considered for encode: ' + encoding.name); |
| 19 }); | 19 }); |
| 20 }); | 20 }); |
| 21 | 21 |
| 22 </script> | 22 </script> |
| OLD | NEW |