OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <title>Encoding API: Encoding labels</title> |
| 3 <script src="../../../resources/testharness.js"></script> |
| 4 <script src="../../../resources/testharnessreport.js"></script> |
3 <script src="resources/shared.js"></script> | 5 <script src="resources/shared.js"></script> |
4 <script> | 6 <script> |
5 | 7 |
6 description("Test the Encoding API's use of encoding names"); | |
7 | |
8 encodings_table.forEach(function(section) { | 8 encodings_table.forEach(function(section) { |
9 var list = section.encodings; | 9 section.encodings.forEach(function(encoding) { |
10 list.forEach(function(encoding) { | 10 var name = encoding.name; |
11 debug(""); | 11 test(function(){ |
12 evalAndLog("name = " + JSON.stringify(encoding.name)); | 12 encoding.labels.forEach(function(label) { |
13 encoding.labels.forEach(function(label) { | 13 assert_equals(new TextDecoder(label).encoding, encoding.name); |
14 shouldBeEqualToString("new TextDecoder(" + JSON.stringify(label) + "
).encoding", encoding.name); | 14 }); |
15 }); | 15 }, 'Labels for: ' + name); |
16 }); | 16 }); |
17 }); | 17 }); |
18 | 18 |
19 </script> | 19 </script> |
OLD | NEW |