https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7d1437d93394587f1fa752d1a68f529f9f04d99f authored by Anne van Kesteren on 27 November 2018, 15:40:44 UTC
WIP: figuring out Origin outside of CORS
Tip revision: 7d1437d
api-replacement-encodings.any.js
// 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(new RangeError(), function() { new TextDecoder(label); });
            }, 'Label for "replacement" should be rejected by API: ' + label);
        });
    });
});

back to top