<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description("This test verifies that encodings that used to be supported by TEC on macOS  are still  supported.");


debug("The following encoding names are supported by WebKit cross-platform, but some may be removed at a later time.");
let validForNow = [
    {encoding: 'iso-8859-10', aliases: ['iso-8859-10', 'iso8859101992', 'isoir157', 'csisolatin6', 'latin6', 'l6']},
    {encoding: 'windows-874', aliases: ['iso-8859-11']},
    {encoding: 'iso-8859-14', aliases: ['iso-8859-14', 'isoceltic', 'iso8859141998', 'isoir199', 'latin8', 'l8']},
    {encoding: 'iso-8859-16', aliases: ['iso-8859-16', 'isoir226', 'iso8859162001', 'l10', 'latin10']},
    {encoding: 'koi8-u', aliases: ['koi8-u']}
];

for (let encoding of validForNow) {
    for (let alias of encoding.aliases) {
         let canonical_name_expr = 'new TextDecoder("' + alias + '").encoding';
         shouldBe(canonical_name_expr, '"' + encoding.encoding + '"');
    }
}

</script>
</body>
</html>
