https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 23b21c3ff52b6ba75cdfbbd3c86b73c9849c366a authored by Philip Jägenstedt on 27 August 2018, 12:41:26 UTC
Add historical tests for SSML in Speech API
Tip revision: 23b21c3
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