| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../js/resources/js-test-pre.js"></script> | 2 <script src="../../js/resources/js-test-pre.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 ]; | 15 ]; |
| 16 | 16 |
| 17 // encoding-labels.html tests the full set of names/labels; this test just | 17 // encoding-labels.html tests the full set of names/labels; this test just |
| 18 // exercises some common cases and case-insensitivity. | 18 // exercises some common cases and case-insensitivity. |
| 19 | 19 |
| 20 encodings.forEach(function(test) { | 20 encodings.forEach(function(test) { |
| 21 shouldBeEqualToString("new TextDecoder('" + test.label.toLowerCase() + "').e
ncoding", test.encoding); | 21 shouldBeEqualToString("new TextDecoder('" + test.label.toLowerCase() + "').e
ncoding", test.encoding); |
| 22 shouldBeEqualToString("new TextDecoder('" + test.label.toUpperCase() + "').e
ncoding", test.encoding); | 22 shouldBeEqualToString("new TextDecoder('" + test.label.toUpperCase() + "').e
ncoding", test.encoding); |
| 23 }); | 23 }); |
| 24 | 24 |
| 25 </script> | 25 </script> |
| 26 <script src="../../js/resources/js-test-post.js"></script> | |
| OLD | NEW |