1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-26 17:19:06 -05:00

feat(op_crates/web): adding gb18030 and GBK encodings (#9242)

This commit is contained in:
ali ahmed 2021-01-24 21:08:01 +02:00 committed by GitHub
parent ad60e750d7
commit feff6361b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1963 additions and 28 deletions

View file

@ -5306,7 +5306,9 @@ fn web_platform_tests() {
});
let testharness_path = util::wpt_path().join("resources/testharness.js");
let testharness_text = std::fs::read_to_string(&testharness_path).unwrap();
let testharness_text = std::fs::read_to_string(&testharness_path)
.unwrap()
.replace("output:true", "output:false");
let testharnessreporter_path =
util::tests_path().join("wpt_testharnessconsolereporter.js");
let testharnessreporter_text =

View file

@ -103,17 +103,6 @@ unitTest(function textDecoderErrorEncoding(): void {
assert(didThrow);
});
unitTest(function textDecoderHandlesNotFoundInternalDecoder() {
let didThrow = false;
try {
new TextDecoder("gbk");
} catch (e) {
didThrow = true;
assert(e instanceof RangeError);
}
assert(didThrow);
});
unitTest(function textEncoder(): void {
const fixture = "𝓽𝓮𝔁𝓽";
const encoder = new TextEncoder();

View file

@ -90,16 +90,6 @@
{
"name": "textdecoder-labels",
"expectFail": [
"chinese => GBK",
"csgb2312 => GBK",
"csiso58gb231280 => GBK",
"gb2312 => GBK",
"gb_2312 => GBK",
"gb_2312-80 => GBK",
"gbk => GBK",
"iso-ir-58 => GBK",
"x-gbk => GBK",
"gb18030 => gb18030",
"cseucpkdfmtjapanese => EUC-JP",
"euc-jp => EUC-JP",
"x-euc-jp => EUC-JP",
@ -132,8 +122,6 @@
{
"name": "textencoder-constructor-non-utf",
"expectFail": [
"Encoding argument supported for decode: GBK",
"Encoding argument supported for decode: gb18030",
"Encoding argument supported for decode: EUC-JP",
"Encoding argument supported for decode: ISO-2022-JP",
"Encoding argument supported for decode: Shift_JIS",
@ -141,7 +129,8 @@
"Encoding argument supported for decode: x-user-defined"
]
},
"textencoder-utf16-surrogates"
"textencoder-utf16-surrogates",
"legacy-mb-schinese"
// TODO(lucacasonato): uses XMLHttpRequest unnecessarily. should be fixed upstream before enabling
// "unsupported-encodings",
],
@ -236,7 +225,7 @@
"console-namespace-object-class-string",
"console-tests-historical"
],
"WebCryptoApi": ["getRandomValues"]
"WebCryptoApi": ["getRandomValues"],
"WebIDL": [
"ecmascript-binding/es-exceptions/DOMException-constants",
"ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype",

File diff suppressed because it is too large Load diff

@ -1 +1 @@
Subproject commit a51d36327febebc8634d7b523a7e620f4ebdbf26
Subproject commit 581873eb00db0820a0d425dd9c005705cfbbc06f