Skip to content

Commit da34c6c

Browse files
joyeecheungaddaleax
authored andcommitted
test: use WPT runner to run encoding tests
PR-URL: #25321 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 8d8c305 commit da34c6c

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

test/wpt/status/encoding.json

+51-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
{}
1+
{
2+
"api-basics.any.js": {
3+
"requires": ["small-icu"]
4+
},
5+
"textdecoder-fatal-streaming.any.js": {
6+
"requires": ["small-icu"]
7+
},
8+
"textdecoder-fatal.any.js": {
9+
"requires": ["small-icu"]
10+
},
11+
"textdecoder-ignorebom.any.js": {
12+
"requires": ["small-icu"]
13+
},
14+
"textdecoder-streaming.any.js": {
15+
"requires": ["small-icu"]
16+
},
17+
"textdecoder-utf16-surrogates.any.js": {
18+
"requires": ["small-icu"]
19+
},
20+
"iso-2022-jp-decoder.any.js": {
21+
"requires": ["full-icu"],
22+
"fail": "iso-2022-jp decoder state handling bug: https://encoding.spec.whatwg.org/#iso-2022-jp-decoder"
23+
},
24+
"textdecoder-byte-order-marks.any.js": {
25+
"fail": "Mismatching BOM should not be ignored"
26+
},
27+
"textdecoder-copy.any.js": {
28+
"fail": "Should not have output BOM: https://encoding.spec.whatwg.org/#concept-td-serialize"
29+
},
30+
"textdecoder-fatal-single-byte.any.js": {
31+
"requires": ["full-icu"],
32+
"fail": "The iso-8859-16 encoding is not supported"
33+
},
34+
"textdecoder-labels.any.js": {
35+
"requires": ["full-icu"],
36+
"fail": "The iso-8859-16 encoding is not supported"
37+
},
38+
"textencoder-constructor-non-utf.any.js": {
39+
"requires": ["full-icu"],
40+
"fail": "The iso-8859-16 encoding is not supported"
41+
},
42+
"idlharness.any.js": {
43+
"fail": "No implementation of TextDecoderStream and TextEncoderStream"
44+
},
45+
"replacement-encodings.any.js": {
46+
"skip": "decoding-helpers.js needs XMLHttpRequest"
47+
},
48+
"unsupported-encodings.any.js": {
49+
"skip": "decoding-helpers.js needs XMLHttpRequest"
50+
}
51+
}

test/wpt/test-encoding.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
// Flags: --expose-internals
4+
5+
require('../common');
6+
const { WPTRunner } = require('../common/wpt');
7+
const runner = new WPTRunner('encoding');
8+
9+
// Copy global descriptors from the global object
10+
runner.copyGlobalsFromObject(global, ['TextDecoder', 'TextEncoder']);
11+
12+
runner.runJsTests();

0 commit comments

Comments
 (0)