diff --git a/test/common/wpt.js b/test/common/wpt.js index de8dd0fc428e4e..0b4424ef73b224 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -1,7 +1,7 @@ +/* eslint-disable node-core/required-modules */ 'use strict'; const assert = require('assert'); -const common = require('../common'); const fixtures = require('../common/fixtures'); const fs = require('fs'); const fsPromises = fs.promises; @@ -160,12 +160,49 @@ class WPTTest { getContent() { return fs.readFileSync(this.getAbsolutePath(), 'utf8'); } +} + +const kIntlRequirement = { + none: 0, + small: 1, + full: 2, + // TODO(joyeecheung): we may need to deal with --with-intl=system-icu +}; + +class IntlRequirement { + constructor() { + this.currentIntl = kIntlRequirement.none; + if (process.config.variables.v8_enable_i18n_support === 0) { + this.currentIntl = kIntlRequirement.none; + return; + } + // i18n enabled + if (process.config.variables.icu_small) { + this.currentIntl = kIntlRequirement.small; + } else { + this.currentIntl = kIntlRequirement.full; + } + } - requireIntl() { - return this.requires.has('intl'); + /** + * @param {Set} requires + * @returns {string|false} The config that the build is lacking, or false + */ + isLacking(requires) { + const current = this.currentIntl; + if (requires.has('full-icu') && current !== kIntlRequirement.full) { + return 'full-icu'; + } + if (requires.has('small-icu') && current < kIntlRequirement.small) { + return 'small-icu'; + } + return false; } } +const intlRequirements = new IntlRequirement(); + + class StatusLoader { constructor(path) { this.path = path; @@ -498,8 +535,9 @@ class WPTRunner { continue; } - if (!common.hasIntl && test.requireIntl()) { - this.skip(filename, [ 'missing Intl' ]); + const lackingIntl = intlRequirements.isLacking(test.requires); + if (lackingIntl) { + this.skip(filename, [ `requires ${lackingIntl}` ]); continue; } diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 80495cd15fb8c8..a3ff40477c179c 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -10,10 +10,11 @@ See [test/wpt](../../wpt/README.md) for information on how these tests are run. Last update: -- resources: https://github.com/web-platform-tests/wpt/tree/679a364421/resources -- interfaces: https://github.com/web-platform-tests/wpt/tree/db7f86289e/interfaces - console: https://github.com/web-platform-tests/wpt/tree/9786a4b131/console +- encoding: https://github.com/web-platform-tests/wpt/tree/a093a659ed/encoding - url: https://github.com/web-platform-tests/wpt/tree/75b0f336c5/url +- resources: https://github.com/web-platform-tests/wpt/tree/679a364421/resources +- interfaces: https://github.com/web-platform-tests/wpt/tree/712c9f275e/interfaces [Web Platform Tests]: https://github.com/web-platform-tests/wpt [`git node wpt`]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-wpt diff --git a/test/fixtures/wpt/encoding/META.yml b/test/fixtures/wpt/encoding/META.yml new file mode 100644 index 00000000000000..a219a492f0b963 --- /dev/null +++ b/test/fixtures/wpt/encoding/META.yml @@ -0,0 +1,4 @@ +spec: https://encoding.spec.whatwg.org/ +suggested_reviewers: + - inexorabletash + - annevk diff --git a/test/fixtures/wpt/encoding/api-basics.any.js b/test/fixtures/wpt/encoding/api-basics.any.js new file mode 100644 index 00000000000000..941b878738ce71 --- /dev/null +++ b/test/fixtures/wpt/encoding/api-basics.any.js @@ -0,0 +1,52 @@ +// META: title=Encoding API: Basics + +test(function() { + assert_equals((new TextEncoder).encoding, 'utf-8', 'default encoding is utf-8'); + assert_equals((new TextDecoder).encoding, 'utf-8', 'default encoding is utf-8'); +}, 'Default encodings'); + +test(function() { + assert_array_equals(new TextEncoder().encode(), [], 'input default should be empty string') + assert_array_equals(new TextEncoder().encode(undefined), [], 'input default should be empty string') +}, 'Default inputs'); + + +function testDecodeSample(encoding, string, bytes) { + test(function() { + assert_equals(new TextDecoder(encoding).decode(new Uint8Array(bytes)), string); + assert_equals(new TextDecoder(encoding).decode(new Uint8Array(bytes).buffer), string); + }, 'Decode sample: ' + encoding); +} + +// z (ASCII U+007A), cent (Latin-1 U+00A2), CJK water (BMP U+6C34), +// G-Clef (non-BMP U+1D11E), PUA (BMP U+F8FF), PUA (non-BMP U+10FFFD) +// byte-swapped BOM (non-character U+FFFE) +var sample = 'z\xA2\u6C34\uD834\uDD1E\uF8FF\uDBFF\uDFFD\uFFFE'; + +test(function() { + var encoding = 'utf-8'; + var string = sample; + var bytes = [0x7A, 0xC2, 0xA2, 0xE6, 0xB0, 0xB4, 0xF0, 0x9D, 0x84, 0x9E, 0xEF, 0xA3, 0xBF, 0xF4, 0x8F, 0xBF, 0xBD, 0xEF, 0xBF, 0xBE]; + var encoded = new TextEncoder().encode(string); + assert_array_equals([].slice.call(encoded), bytes); + assert_equals(new TextDecoder(encoding).decode(new Uint8Array(bytes)), string); + assert_equals(new TextDecoder(encoding).decode(new Uint8Array(bytes).buffer), string); +}, 'Encode/decode round trip: utf-8'); + +testDecodeSample( + 'utf-16le', + sample, + [0x7A, 0x00, 0xA2, 0x00, 0x34, 0x6C, 0x34, 0xD8, 0x1E, 0xDD, 0xFF, 0xF8, 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF] +); + +testDecodeSample( + 'utf-16be', + sample, + [0x00, 0x7A, 0x00, 0xA2, 0x6C, 0x34, 0xD8, 0x34, 0xDD, 0x1E, 0xF8, 0xFF, 0xDB, 0xFF, 0xDF, 0xFD, 0xFF, 0xFE] +); + +testDecodeSample( + 'utf-16', + sample, + [0x7A, 0x00, 0xA2, 0x00, 0x34, 0x6C, 0x34, 0xD8, 0x1E, 0xDD, 0xFF, 0xF8, 0xFF, 0xDB, 0xFD, 0xDF, 0xFE, 0xFF] +); diff --git a/test/fixtures/wpt/encoding/api-invalid-label.any.js b/test/fixtures/wpt/encoding/api-invalid-label.any.js new file mode 100644 index 00000000000000..38c0e9a55fd480 --- /dev/null +++ b/test/fixtures/wpt/encoding/api-invalid-label.any.js @@ -0,0 +1,24 @@ +// META: title=Encoding API: invalid label +// META: timeout=long +// META: script=resources/encodings.js + +var tests = ["invalid-invalidLabel"]; +setup(function() { + encodings_table.forEach(function(section) { + section.encodings.forEach(function(encoding) { + encoding.labels.forEach(function(label) { + ["\u0000", "\u000b", "\u00a0", "\u2028", "\u2029"].forEach(function(ws) { + tests.push(ws + label); + tests.push(label + ws); + tests.push(ws + label + ws); + }); + }); + }); + }); +}); + +tests.forEach(function(input) { + test(function() { + assert_throws(new RangeError(), function() { new TextDecoder(input); }); + }, 'Invalid label ' + format_value(input) + ' should be rejected by TextDecoder.'); +}); diff --git a/test/fixtures/wpt/encoding/api-replacement-encodings.any.js b/test/fixtures/wpt/encoding/api-replacement-encodings.any.js new file mode 100644 index 00000000000000..6d1e494ac3979b --- /dev/null +++ b/test/fixtures/wpt/encoding/api-replacement-encodings.any.js @@ -0,0 +1,15 @@ +// META: title=Encoding API: replacement encoding +// META: script=resources/encodings.js + +encodings_table.forEach(function(section) { + section.encodings.filter(function(encoding) { + return encoding.name === 'replacement'; + }).forEach(function(encoding) { + encoding.labels.forEach(function(label) { + test(function() { + assert_throws(new RangeError(), function() { new TextDecoder(label); }); + }, 'Label for "replacement" should be rejected by API: ' + label); + }); + }); +}); + diff --git a/test/fixtures/wpt/encoding/api-surrogates-utf8.any.js b/test/fixtures/wpt/encoding/api-surrogates-utf8.any.js new file mode 100644 index 00000000000000..a4ced03d428e94 --- /dev/null +++ b/test/fixtures/wpt/encoding/api-surrogates-utf8.any.js @@ -0,0 +1,48 @@ +// META: title=Encoding API: Invalid UTF-16 surrogates with UTF-8 encoding + +var badStrings = [ + { + input: 'abc123', + expected: [0x61, 0x62, 0x63, 0x31, 0x32, 0x33], + decoded: 'abc123', + name: 'Sanity check' + }, + { + input: '\uD800', + expected: [0xef, 0xbf, 0xbd], + decoded: '\uFFFD', + name: 'Surrogate half (low)' + }, + { + input: '\uDC00', + expected: [0xef, 0xbf, 0xbd], + decoded: '\uFFFD', + name: 'Surrogate half (high)' + }, + { + input: 'abc\uD800123', + expected: [0x61, 0x62, 0x63, 0xef, 0xbf, 0xbd, 0x31, 0x32, 0x33], + decoded: 'abc\uFFFD123', + name: 'Surrogate half (low), in a string' + }, + { + input: 'abc\uDC00123', + expected: [0x61, 0x62, 0x63, 0xef, 0xbf, 0xbd, 0x31, 0x32, 0x33], + decoded: 'abc\uFFFD123', + name: 'Surrogate half (high), in a string' + }, + { + input: '\uDC00\uD800', + expected: [0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd], + decoded: '\uFFFD\uFFFD', + name: 'Wrong order' + } +]; + +badStrings.forEach(function(t) { + test(function() { + var encoded = new TextEncoder().encode(t.input); + assert_array_equals([].slice.call(encoded), t.expected); + assert_equals(new TextDecoder('utf-8').decode(encoded), t.decoded); + }, 'Invalid surrogates encoded into UTF-8: ' + t.name); +}); diff --git a/test/fixtures/wpt/encoding/big5-encoder.html b/test/fixtures/wpt/encoding/big5-encoder.html new file mode 100644 index 00000000000000..7260b6b155b13d --- /dev/null +++ b/test/fixtures/wpt/encoding/big5-encoder.html @@ -0,0 +1,33 @@ + + + + +
+ diff --git a/test/fixtures/wpt/encoding/eof-shift_jis-ref.html b/test/fixtures/wpt/encoding/eof-shift_jis-ref.html new file mode 100644 index 00000000000000..b90f8032a31db2 --- /dev/null +++ b/test/fixtures/wpt/encoding/eof-shift_jis-ref.html @@ -0,0 +1,4 @@ + + +
+$BZP(B
+$B06(B
+$B6T(B
+$B@M(B
+$BI`(B
+$BZQ(B
+$B;B(B
+$BCG(B
+$B;[(B
+$B?7(B
+$BZR(B
+$BJ}(B
+$B1w(B
+$B;\(B
+$BZU(B
+$BZS(B
+$BZV(B
+$BN9(B
+$BZT(B
+$B@{(B
+$BZW(B
+$BB2(B
+$BZX(B
+$B4z(B
+$BZZ(B
+$BZY(B
+$BZ[(B
+$BZ\(B
+$B4{(B
+$BF|(B
+$BC6(B
+$B5l(B
+$B;](B
+$BAa(B
+$B=\(B
+$B00(B
+$BZ](B
+$B2"(B
+$BZa(B
+$Bz4(B
+$B97(B
+$BZ`(B
+$B:+(B
+$B>:(B
+$Bz7(B
+$BZ_(B
+$B>;(B
+$BL@(B
+$B:*(B
+$B0W(B
+$B@N(B
+$Bz5(B
+$BZf(B
+$Bz9(B
+$B@1(B
+$B1G(B
+$Bz:(B
+$B=U(B
+$BKf(B
+$B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f(B
+$B#g(B
+$B#h(B
+$B#i(B
+$B#j(B
+$B#k(B
+$B#l(B
+$B#m(B
+$B#n(B
+$B#o(B
+$B#p(B
+$B#q(B
+$B#r(B
+$B#s(B
+$B#t(B
+$B#u(B
+$B#v(B
+$B#w(B
+$B#x(B
+$B#y(B
+$B#z(B
+$B!P(B
+$B!C(B
+$B!Q(B
+$B!A(B
+$B!q(B
+$B!r(B
+$B"L(B
+$B!1(B
+$B||(B
+$B!o(B
\ No newline at end of file
diff --git a/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars-csiso2022jp.html.headers b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars-csiso2022jp.html.headers
new file mode 100644
index 00000000000000..547bbcb4505b46
--- /dev/null
+++ b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars-csiso2022jp.html.headers
@@ -0,0 +1 @@
+Content-Type: text/html; charset=csiso2022jp
diff --git a/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars.html b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars.html
new file mode 100644
index 00000000000000..aa42723c79c804
--- /dev/null
+++ b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars.html
@@ -0,0 +1,7330 @@
+
+$B@z(B
+$B_o(B
+$B_g(B
+$B7'(B
+$B_m(B
+$BMP(B
+$B_p(B
+$Bt&(B
+$B=O(B
+$B_q(B
+$B_r(B
+$BG.(B
+$B_t(B
+$B_u(B
+$Bz|(B
+$BG3(B
+$BEu(B
+$B_w(B
+$B_y(B
+$BNU(B
+$B_v(B
+$B_x(B
+$B1m(B
+$B_s(B
+$BS[(B
+$B_z(B
+$BAg(B
+$B;8(B
+$B_|(B
+$B_{(B
+$B?$(B
+$BRY(B
+$B_}(B
+$B`!(B
+$B_n(B
+$B_~(B
+$Bz}(B
+$B`"(B
+$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+$B#8(B
+$B#9(B
+$B!'(B
+$B!((B
+$B!c(B
+$B!a(B
+$B!d(B
+$B!)(B
+$B!w(B
+$B#A(B
+$B#B(B
+$B#C(B
+$B#D(B
+$B#E(B
+$B#F(B
+$B#G(B
+$B#H(B
+$B#I(B
+$B#J(B
+$B#K(B
+$B#L(B
+$B#M(B
+$B#N(B
+$B#O(B
+$B#P(B
+$B#Q(B
+$B#R(B
+$B#S(B
+$B#T(B
+$B#U(B
+$B#V(B
+$B#W(B
+$B#X(B
+$B#Y(B
+$B#Z(B
+$B!N(B
+$B!@(B
+$B!O(B
+$B!0(B
+$B!2(B
+$B!.(B
+$B#a(B
+$B#b(B
+$B#c(B
+$B#d(B
+$B#e(B
+$B#f(B
+$B#g(B
+$B#h(B
+$B#i(B
+$B#j(B
+$B#k(B
+$B#l(B
+$B#m(B
+$B#n(B
+$B#o(B
+$B#p(B
+$B#q(B
+$B#r(B
+$B#s(B
+$B#t(B
+$B#u(B
+$B#v(B
+$B#w(B
+$B#x(B
+$B#y(B
+$B#z(B
+$B!P(B
+$B!C(B
+$B!Q(B
+$B!A(B
+$B!q(B
+$B!r(B
+$B"L(B
+$B!1(B
+$B||(B
+$B!o(B
diff --git a/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars.html.headers b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars.html.headers
new file mode 100644
index 00000000000000..51324ea2d35c16
--- /dev/null
+++ b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_chars.html.headers
@@ -0,0 +1 @@
+Content-Type: text/html; charset=iso-2022-jp
diff --git a/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_errors.html b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_errors.html
new file mode 100644
index 00000000000000..aeed3defabdbb3
--- /dev/null
+++ b/test/fixtures/wpt/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_errors.html
@@ -0,0 +1,8 @@
+
+
+
+
+