Skip to content

Commit

Permalink
test: use WPT runner to run encoding tests
Browse files Browse the repository at this point in the history
PR-URL: #25321
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
joyeecheung authored and addaleax committed Jan 14, 2019
1 parent 8d8c305 commit da34c6c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
52 changes: 51 additions & 1 deletion test/wpt/status/encoding.json
Original file line number Diff line number Diff line change
@@ -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 changes: 12 additions & 0 deletions test/wpt/test-encoding.js
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit da34c6c

Please sign in to comment.