test: use WPT runner to run encoding tests

PR-URL: https://github.com/nodejs/node/pull/25321
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Joyee Cheung 2018-12-04 18:35:12 +08:00
parent c667325cbe
commit 16dfa0f309
No known key found for this signature in database
GPG Key ID: 92B78A53C8303B8D
2 changed files with 63 additions and 1 deletions

View File

@ -1 +1,51 @@
{}
{
"api-basics.any.js": {
"requires": ["small-icu"]
},
"textdecoder-fatal-streaming.any.js": {
"requires": ["small-icu"]
},
"textdecoder-fatal.any.js": {
"requires": ["small-icu"]
},
"textdecoder-ignorebom.any.js": {
"requires": ["small-icu"]
},
"textdecoder-streaming.any.js": {
"requires": ["small-icu"]
},
"textdecoder-utf16-surrogates.any.js": {
"requires": ["small-icu"]
},
"iso-2022-jp-decoder.any.js": {
"requires": ["full-icu"],
"fail": "iso-2022-jp decoder state handling bug: https://encoding.spec.whatwg.org/#iso-2022-jp-decoder"
},
"textdecoder-byte-order-marks.any.js": {
"fail": "Mismatching BOM should not be ignored"
},
"textdecoder-copy.any.js": {
"fail": "Should not have output BOM: https://encoding.spec.whatwg.org/#concept-td-serialize"
},
"textdecoder-fatal-single-byte.any.js": {
"requires": ["full-icu"],
"fail": "The iso-8859-16 encoding is not supported"
},
"textdecoder-labels.any.js": {
"requires": ["full-icu"],
"fail": "The iso-8859-16 encoding is not supported"
},
"textencoder-constructor-non-utf.any.js": {
"requires": ["full-icu"],
"fail": "The iso-8859-16 encoding is not supported"
},
"idlharness.any.js": {
"fail": "No implementation of TextDecoderStream and TextEncoderStream"
},
"replacement-encodings.any.js": {
"skip": "decoding-helpers.js needs XMLHttpRequest"
},
"unsupported-encodings.any.js": {
"skip": "decoding-helpers.js needs XMLHttpRequest"
}
}

12
test/wpt/test-encoding.js Normal file
View File

@ -0,0 +1,12 @@
'use strict';
// Flags: --expose-internals
require('../common');
const { WPTRunner } = require('../common/wpt');
const runner = new WPTRunner('encoding');
// Copy global descriptors from the global object
runner.copyGlobalsFromObject(global, ['TextDecoder', 'TextEncoder']);
runner.runJsTests();