https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7b0061705c52222dbc2b65c88ce79e58c8f6b1ec authored by James Graham on 04 October 2018, 14:36:57 UTC
Change some wptrunner testdriver details
Tip revision: 7b00617
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