• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// META: title=Encoding API: replacement encoding
2// META: script=resources/encodings.js
3
4encodings_table.forEach(function(section) {
5    section.encodings.filter(function(encoding) {
6        return encoding.name === 'replacement';
7    }).forEach(function(encoding) {
8        encoding.labels.forEach(function(label) {
9            test(function() {
10                assert_throws(new RangeError(), function() { new TextDecoder(label); });
11            }, 'Label for "replacement" should be rejected by API: ' + label);
12        });
13    });
14});
15