Skip to content

Commit

Permalink
test: update encoding wpt to latest
Browse files Browse the repository at this point in the history
PR-URL: #45850
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
anonrig authored and juanarbol committed Jan 24, 2023
1 parent cade2fc commit 286acaa
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/wpt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Last update:
- console: https://github.com/web-platform-tests/wpt/tree/767ae35464/console
- dom/abort: https://github.com/web-platform-tests/wpt/tree/8fadb38120/dom/abort
- dom/events: https://github.com/web-platform-tests/wpt/tree/f8821adb28/dom/events
- encoding: https://github.com/web-platform-tests/wpt/tree/c1b24fce6e/encoding
- encoding: https://github.com/web-platform-tests/wpt/tree/779d175c40/encoding
- fetch/data-urls/resources: https://github.com/web-platform-tests/wpt/tree/7c79d998ff/fetch/data-urls/resources
- FileAPI: https://github.com/web-platform-tests/wpt/tree/3b279420d4/FileAPI
- FileAPI/file: https://github.com/web-platform-tests/wpt/tree/c01f637cca/FileAPI/file
Expand Down
178 changes: 178 additions & 0 deletions test/fixtures/wpt/encoding/unsupported-labels.window.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
// This list was inspired by these sources:
// - https://annevankesteren.nl/2010/8-bit-labels
// - http://l0.cm/encodings/table/

[
"437",
"adobe-standard-encoding",
"armscii-8",
"bocu-1",
"cesu-8",
"cp1025",
"cp437",
"cp737",
"cp851",
"cp858",
"cp862",
"cp864",
"cp869",
"cp875",
"cp950",
"csiso103t618bit",
"csiso111ecmacyrillic",
"cspc8codepage437",
"csviscii",
"dos-720",
"dos-862",
"ecma-cyrillic",
"euc-tw",
"german",
"geostd8",
"hp-roman8",
"ibm-thai",
"ibm00858",
"ibm00924",
"ibm01047",
"ibm01140",
"ibm01141",
"ibm01142",
"ibm01143",
"ibm01144",
"ibm01145",
"ibm01146",
"ibm01147",
"ibm01148",
"ibm01149",
"ibm037",
"ibm1026",
"ibm1047",
"ibm273",
"ibm277",
"ibm278",
"ibm280",
"ibm284",
"ibm285",
"ibm290",
"ibm297",
"ibm367",
"ibm420",
"ibm423",
"ibm424",
"ibm437",
"ibm500",
"ibm737",
"ibm775",
"ibm850",
"ibm852",
"ibm855",
"ibm857",
"ibm860",
"ibm861",
"ibm862",
"ibm863",
"ibm864",
"ibm864i",
"ibm865",
"ibm868",
"ibm869",
"ibm870",
"ibm871",
"ibm880",
"ibm905",
"ibm918",
"iso-2022-jp-1",
"iso-2022-jp-2",
"iso-2022-jp-3",
"iso-8859-8 visual",
"jis_c6226-1978",
"jis_x0208-1983",
"jis_x0208-1990",
"jis_x0212-1990",
"johab",
"latin9",
"norwegian",
"sami-ws2",
"scsu",
"shift_jis_x0213-2000",
"swedish",
"tcvn",
"tis-620-2533",
"utf-7",
"utf-32",
"viscii",
"windows-936-2000",
"windows-sami-2",
"ws2",
"x-chinese-cns",
"x-chinese-eten",
"x-cp20001",
"x-cp20003",
"x-cp20004",
"x-cp20005",
"x-cp20261",
"x-cp20269",
"x-cp20936",
"x-cp20949",
"x-cp21027",
"x-cp50227",
"x-cp50229",
"x-ebcdic-koreanextended",
"x-europa",
"x-ia5",
"x-ia5-german",
"x-ia5-norwegian",
"x-ia5-swedish",
"x-iscii-as",
"x-iscii-be",
"x-iscii-de",
"x-iscii-gu",
"x-iscii-ka",
"x-iscii-ma",
"x-iscii-or",
"x-iscii-pa",
"x-iscii-t",
"x-iscii-ta",
"x-iscii-te",
"x-mac-arabic",
"x-mac-ce",
"x-mac-centraleurroman",
"x-mac-chinesesimp",
"x-mac-chinesetrad",
"x-mac-croatian",
"x-mac-devanagari",
"x-mac-dingbats",
"x-mac-farsi",
"x-mac-greek",
"x-mac-gujarati",
"x-mac-gurmukhi",
"x-mac-hebrew",
"x-mac-icelandic",
"x-mac-japanese",
"x-mac-korean",
"x-mac-roman-latin1",
"x-mac-romanian",
"x-mac-symbol",
"x-mac-thai",
"x-mac-tibetan",
"x-mac-turkish",
"x-mac-vt100",
"x-nextstep",
"x-vps",
"_autodetect",
"_autodetect_all",
"_autodetect_kr"
].forEach(label => {
async_test(t => {
const frame = document.createElement("iframe");
t.add_cleanup(() => {
frame.remove();
});
frame.src = "resources/text-plain-charset.py?label=" + label;
frame.onload = t.step_func_done(() => {
// If we ever change this default this needs adjusting accordingly.
assert_equals(frame.contentDocument.characterSet, "windows-1252");
assert_equals(frame.contentDocument.inputEncoding, "windows-1252");
});
document.body.append(frame);
}, `${label} is not supported by the Encoding Standard`);
});
2 changes: 1 addition & 1 deletion test/fixtures/wpt/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"path": "dom/events"
},
"encoding": {
"commit": "c1b24fce6e625c1b79124a58f27bf9adce02d5d7",
"commit": "779d175c40efcb8f2c9512bebe25ffbeda485708",
"path": "encoding"
},
"fetch/data-urls/resources": {
Expand Down
3 changes: 3 additions & 0 deletions test/wpt/status/encoding.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,8 @@
},
"textdecoder-eof.any.js": {
"requires": ["small-icu"]
},
"unsupported-labels.window.js": {
"skip": "document is not defined"
}
}

0 comments on commit 286acaa

Please sign in to comment.