tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

api-replacement-encodings.any.js (538B)


      1 // META: title=Encoding API: replacement encoding
      2 // META: script=resources/encodings.js
      3 
      4 encodings_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_js(RangeError, function() { new TextDecoder(label); });
     11            }, 'Label for "replacement" should be rejected by API: ' + label);
     12        });
     13    });
     14 });