1
0
Fork 0
firefox/testing/web-platform/tests/encoding/api-replacement-encodings.any.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

15 lines
538 B
JavaScript

// META: title=Encoding API: replacement encoding
// META: script=resources/encodings.js
encodings_table.forEach(function(section) {
section.encodings.filter(function(encoding) {
return encoding.name === 'replacement';
}).forEach(function(encoding) {
encoding.labels.forEach(function(label) {
test(function() {
assert_throws_js(RangeError, function() { new TextDecoder(label); });
}, 'Label for "replacement" should be rejected by API: ' + label);
});
});
});