https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 920625c0189a444b6c4f0ce44ca3d02d5921ee39 authored by Ms2ger on 06 April 2018, 07:56:32 UTC
Add some obsolete, proprietary Gecko interfaces to historical tests.
Tip revision: 920625c
api-replacement-encodings.html
<!DOCTYPE html>
<title>Encoding API: replacement encoding</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/encodings.js"></script>
<script>

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);
        });
    });
});

</script>
back to top