2 <title>Encoding API: Latin-1 decoders</title>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <script src="resources/shared.js"></script>
8 // Blink uses separate decoder object intances for these encoding aliases,
9 // so test that they are behaving identically.
14 encodings_table.forEach(function(section) {
15 section.encodings.forEach(function(encoding) {
16 if (encoding.name === 'windows-1252')
17 labels = encoding.labels;
20 labels = labels.filter(function(label) { return label !== 'windows-1252'; });
22 var array = new Uint8Array(256);
23 for (var cp = 0; cp <= 255; ++cp) {
27 var windows1252 = new TextDecoder('windows-1252');
29 labels.forEach(function(label) {
30 var decoder = new TextDecoder(label);
31 assert_equals(decoder.decode(array), windows1252.decode(array));
34 }, 'Latin-1 decoders (windows-1252, iso-8859-1, us-ascii, etc) decode identically.');