https://github.com/web-platform-tests/wpt
Revision 2839cd992b9bc44e54b2f1b229ead4c0d6b6712f authored by Aryeh Gregor on 12 April 2016, 13:36:58 UTC, committed by Aryeh Gregor on 01 September 2016, 14:58:51 UTC
Based on Gecko's dom/base/test/test_classList.html.  I generalized it to
test all DOMTokenList attributes currently defined in the spec, and
removed testing of mutation events and XUL.
1 parent 0c3a2f1
Raw File
Tip revision: 2839cd992b9bc44e54b2f1b229ead4c0d6b6712f authored by Aryeh Gregor on 12 April 2016, 13:36:58 UTC
Test DOMTokenList
Tip revision: 2839cd9
textencoder-constructor-non-utf.html
<!DOCTYPE html>
<title>Encoding API: Legacy encodings</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.forEach(function(encoding) {
        if (encoding.name !== 'replacement') {
            test(function() {
                assert_equals(new TextDecoder(encoding.name).encoding, encoding.name);
            }, 'Encoding argument supported for decode: ' + encoding.name);
        }

        test(function() {
            assert_equals(new TextEncoder(encoding.name).encoding, 'utf-8');
        }, 'Encoding argument not considered for encode: ' + encoding.name);
    });
});

</script>
back to top