11cb0ef41Sopenharmony_ci// META: title=Encoding API: replacement encoding 21cb0ef41Sopenharmony_ci// META: script=resources/encodings.js 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ciencodings_table.forEach(function(section) { 51cb0ef41Sopenharmony_ci section.encodings.filter(function(encoding) { 61cb0ef41Sopenharmony_ci return encoding.name === 'replacement'; 71cb0ef41Sopenharmony_ci }).forEach(function(encoding) { 81cb0ef41Sopenharmony_ci encoding.labels.forEach(function(label) { 91cb0ef41Sopenharmony_ci test(function() { 101cb0ef41Sopenharmony_ci assert_throws_js(RangeError, function() { new TextDecoder(label); }); 111cb0ef41Sopenharmony_ci }, 'Label for "replacement" should be rejected by API: ' + label); 121cb0ef41Sopenharmony_ci }); 131cb0ef41Sopenharmony_ci }); 141cb0ef41Sopenharmony_ci}); 151cb0ef41Sopenharmony_ci 16