OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Encoding API: Encoding labels</title> | 2 <title>Encoding API: Encoding labels</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/shared.js"></script> |
6 <script> | 6 <script> |
7 | 7 |
8 encodings_table.forEach(function(section) { | 8 encodings_table.forEach(function(section) { |
9 section.encodings.filter(function(encoding) { | 9 section.encodings.filter(function(encoding) { |
10 return encoding.name !== 'replacement'; | 10 return encoding.name !== 'replacement'; |
11 }).forEach(function(encoding) { | 11 }).forEach(function(encoding) { |
12 var name = encoding.name; | 12 var name = encoding.name; |
13 test(function(){ | 13 encoding.labels.forEach(function(label) { |
14 encoding.labels.forEach(function(label) { | 14 test(function(){ |
15 assert_equals(new TextDecoder(label).encoding, encoding.name); | 15 assert_equals(new TextDecoder(label).encoding, encoding.name); |
16 }); | 16 }, 'name=' + name + ' label=' + label); |
17 }, 'Labels for: ' + name); | 17 }); |
18 }); | 18 }); |
19 }); | 19 }); |
20 | 20 |
21 </script> | 21 </script> |
OLD | NEW |