Update WPT tests for encoding
https://bugs.webkit.org/show_bug.cgi?id=207644
Rubber-stamped by Youenn Fablet.
LayoutTests/imported/w3c:
Update from WPT ToT (c8671a2d15)
On top of the automatic import this:
- removes imported/w3c/web-platform-tests/encoding/reftest.list and moves the -ref.html expectations to -expected.html (see bug 203783)
- manually fixes the broken imported tests with byte truncated secuences (see bug 207731)
- manually fixes the test resources of imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode* (see bug 207736)
* web-platform-tests/encoding/META.yml: Added.
* web-platform-tests/encoding/OWNERS: Removed.
* web-platform-tests/encoding/api-basics.any-expected.txt: Added.
* web-platform-tests/encoding/api-basics.any.html: Added.
* web-platform-tests/encoding/api-basics.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/api-basics.html.
* web-platform-tests/encoding/api-basics.any.worker-expected.txt: Added.
* web-platform-tests/encoding/api-basics.any.worker.html: Added.
* web-platform-tests/encoding/api-invalid-label.any-expected.txt: Added.
* web-platform-tests/encoding/api-invalid-label.any.html: Added.
* web-platform-tests/encoding/api-invalid-label.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/api-invalid-label.html.
(tests.forEach):
* web-platform-tests/encoding/api-invalid-label.any.worker-expected.txt: Added.
* web-platform-tests/encoding/api-invalid-label.any.worker.html: Added.
* web-platform-tests/encoding/api-replacement-encodings.any-expected.txt: Added.
* web-platform-tests/encoding/api-replacement-encodings.any.html: Added.
* web-platform-tests/encoding/api-replacement-encodings.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/api-replacement-encodings.html.
(encodings_table.forEach):
* web-platform-tests/encoding/api-replacement-encodings.any.worker-expected.txt: Added.
* web-platform-tests/encoding/api-replacement-encodings.any.worker.html: Added.
* web-platform-tests/encoding/api-surrogates-utf8.any-expected.txt: Added.
* web-platform-tests/encoding/api-surrogates-utf8.any.html: Added.
* web-platform-tests/encoding/api-surrogates-utf8.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/api-surrogates-utf8.html.
(badStrings.forEach):
* web-platform-tests/encoding/api-surrogates-utf8.any.worker-expected.txt: Added.
* web-platform-tests/encoding/api-surrogates-utf8.any.worker.html: Added.
* web-platform-tests/encoding/big5-encoder-expected.txt:
* web-platform-tests/encoding/big5-encoder.html:
* web-platform-tests/encoding/encodeInto.any-expected.txt: Added.
* web-platform-tests/encoding/encodeInto.any.html: Added.
* web-platform-tests/encoding/encodeInto.any.js: Added.
(forEach.testData.forEach.destinationData.string_appeared_here.forEach.arrayBufferOrSharedArrayBuffer.test):
(Float64Array.forEach.view.string_appeared_here.forEach):
(string_appeared_here.forEach):
(test):
* web-platform-tests/encoding/encodeInto.any.worker-expected.txt: Added.
* web-platform-tests/encoding/encodeInto.any.worker.html: Added.
* web-platform-tests/encoding/eof-shift_jis-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/eof-shift_jis-ref.html.
* web-platform-tests/encoding/eof-utf-8-one-ref.html: Removed.
* web-platform-tests/encoding/eof-utf-8-three-ref.html: Removed.
* web-platform-tests/encoding/eof-utf-8-two-ref.html: Removed.
* web-platform-tests/encoding/gbk-encoder-expected.txt:
* web-platform-tests/encoding/gbk-encoder.html:
* web-platform-tests/encoding/idlharness.any-expected.txt: Added.
* web-platform-tests/encoding/idlharness.any.html: Added.
* web-platform-tests/encoding/idlharness.any.js: Added.
* web-platform-tests/encoding/idlharness.any.worker-expected.txt: Added.
* web-platform-tests/encoding/idlharness.any.worker.html: Added.
* web-platform-tests/encoding/idlharness.html: Removed.
* web-platform-tests/encoding/iso-2022-jp-decoder.any-expected.txt: Added.
* web-platform-tests/encoding/iso-2022-jp-decoder.any.html: Added.
* web-platform-tests/encoding/iso-2022-jp-decoder.any.js: Added.
(decode):
* web-platform-tests/encoding/iso-2022-jp-decoder.any.worker-expected.txt: Added.
* web-platform-tests/encoding/iso-2022-jp-decoder.any.worker.html: Added.
* web-platform-tests/encoding/iso-2022-jp-decoder.html: Removed.
* web-platform-tests/encoding/iso-2022-jp-encoder-expected.txt:
* web-platform-tests/encoding/iso-2022-jp-encoder.html:
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-cseucpkdfmtjapanese-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-cseucpkdfmtjapanese.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-errors-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-errors.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-x-euc-jp-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode-x-euc-jp.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decode.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-decoder.js: Added.
(dec2char):
(eucjpDecoder):
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-cseucpkdfmtjapanese-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-cseucpkdfmtjapanese.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-cseucpkdfmtjapanese.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-hangul-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-misc-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-misc-expected.txt.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-x-euc-jp-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-x-euc-jp.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form-x-euc-jp.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-form.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-han-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-han-expected.txt.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-hangul-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul-expected.txt.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-misc-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-misc-expected.txt.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encode-href.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp-encoder.js: Added.
(chars2cps):
(eucjpEncoder):
(convertToHex):
(normalizeStr):
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-cseucpkdfmtjapanese.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-cseucpkdfmtjapanese.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-x-euc-jp.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars-x-euc-jp.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_chars.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_errors.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/eucjp_errors.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/jis0208_index.js: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/jis0212_index.js: Added.
* web-platform-tests/encoding/legacy-mb-japanese/euc-jp/w3c-import.log: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-csiso2022jp-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-csiso2022jp.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-errors-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-errors.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decode.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-decoder.js: Added.
(dec2char):
(getIndexPtr):
(iso2022jpDecoder):
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-csiso2022jp.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-han-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-hangul-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-misc-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-stateful-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-errors-stateful.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-form.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-han-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-han-expected.txt.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-han.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-han.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-hangul-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul-expected.txt.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-hangul.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-hangul.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-misc-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-misc-expected.txt.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-misc.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-errors-misc.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href-expected.txt: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encode-href.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp-encoder.js: Added.
(chars2cps):
(iso2022jpEncoder):
(convertToHex):
(normalizeStr):
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_errors.html: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/iso2022jp_errors.html.headers: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/jis0208_index.js: Added.
* web-platform-tests/encoding/legacy-mb-japanese/iso-2022-jp/w3c-import.log: Added.
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-csshiftjis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-errors.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms932.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-ms_kanji.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-shift-jis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-sjis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-windows-31j.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode-x-sjis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decode.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-decoder.js:
(sjisDecoder):
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-csshiftjis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-han-expected.txt:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-han.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-hangul.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-misc-expected.txt:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-errors-misc.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms932.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-ms_kanji.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-shift-jis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-sjis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-windows-31j.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-x-sjis.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-han-expected.txt:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-han.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul-expected.txt:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-misc-expected.txt:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-misc.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href.html:
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encoder.js:
(sjisEncoder):
* web-platform-tests/encoding/legacy-mb-japanese/shift_jis/w3c-import.log:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-cseuckr.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-csksc56011987.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-iso-ir-149.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-korean.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ks_c_5601-1987.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ks_c_5601-1989.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc5601.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-ksc_5601.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode-windows-949.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decode.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-decoder.js:
(euckrDecoder):
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-cseuckr.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-csksc56011987.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han-expected.txt:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-han.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul-expected.txt: Removed.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html: Removed.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-hangul.html.headers: Removed.
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc-expected.txt:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-errors-misc.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-iso-ir-149.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-korean.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1987.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ks_c_5601-1989.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc5601.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-ksc_5601.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form-windows-949.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-han-expected.txt:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-han.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-misc-expected.txt:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-errors-misc.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href-expected.txt:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-href.html:
* web-platform-tests/encoding/legacy-mb-korean/euc-kr/w3c-import.log:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-big5-hkscs.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-cn-big5.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-csbig5.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-extra.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode-x-x-big5.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decode.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-decoder.js:
(big5Decoder):
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-enc-ascii-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-enc-ascii.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-big5-hkscs-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-big5-hkscs.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-cn-big5-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-cn-big5.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-csbig5-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-csbig5.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBa-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBa.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-extBb.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-han-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-han.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-hangul.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-misc-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-misc.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-errors-pua.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-x-x-big5-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form-x-x-big5.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-form.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-han.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-hangul.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-errors-misc.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href-expected.txt:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/big5-encode-href.html:
* web-platform-tests/encoding/legacy-mb-tchinese/big5/w3c-import.log:
* web-platform-tests/encoding/reftest.list: Removed.
* web-platform-tests/encoding/remove-only-one-bom-expected.txt: Added.
* web-platform-tests/encoding/remove-only-one-bom.html: Added.
* web-platform-tests/encoding/resources/decode-common.js: Added.
(showNodes):
* web-platform-tests/encoding/resources/encode-form-common.js: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-form-sjis.html.
(setup):
(runNext.iframe.onload):
* web-platform-tests/encoding/resources/encode-href-common.js: Added.
(encode):
* web-platform-tests/encoding/resources/ranges.js: Added.
* web-platform-tests/encoding/resources/single-byte-raw.py:
(main):
* web-platform-tests/encoding/resources/two-boms-utf-16be.html: Added.
* web-platform-tests/encoding/resources/two-boms-utf-16le.html: Added.
* web-platform-tests/encoding/resources/two-boms-utf-8.html: Added.
* web-platform-tests/encoding/resources/utf-32-big-endian-bom.html:
* web-platform-tests/encoding/resources/utf-32-big-endian-bom.xml:
* web-platform-tests/encoding/resources/utf-32-big-endian-nobom.html:
* web-platform-tests/encoding/resources/utf-32-big-endian-nobom.xml:
* web-platform-tests/encoding/resources/utf-32-little-endian-bom.html:
* web-platform-tests/encoding/resources/utf-32-little-endian-bom.xml:
* web-platform-tests/encoding/resources/utf-32-little-endian-nobom.html:
* web-platform-tests/encoding/resources/utf-32-little-endian-nobom.xml:
* web-platform-tests/encoding/resources/w3c-import.log:
* web-platform-tests/encoding/single-byte-decoder.html:
* web-platform-tests/encoding/sniffing-expected.txt: Added.
* web-platform-tests/encoding/sniffing.html: Added.
* web-platform-tests/encoding/streams/backpressure.any.js: Added.
(input.new.Uint8Array):
* web-platform-tests/encoding/streams/backpressure.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/backpressure.any.worker.html: Added.
* web-platform-tests/encoding/streams/decode-attributes.any.js: Added.
(const.label.of.Object.keys):
(null.test):
(null.setting.fatal.to.string_appeared_here.should.set the):
(null.setting.ignoreBOM.to.string_appeared_here.should.set the):
(string_appeared_here.setting.fatal.to.string_appeared_here.should.set the):
(string_appeared_here.setting.ignoreBOM.to.string_appeared_here.should.set the):
* web-platform-tests/encoding/streams/decode-attributes.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/decode-attributes.any.worker.html: Added.
* web-platform-tests/encoding/streams/decode-bad-chunks.any.js: Added.
(const.chunk.of.badChunks.promise_test.async t):
* web-platform-tests/encoding/streams/decode-bad-chunks.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/decode-bad-chunks.any.worker.html: Added.
* web-platform-tests/encoding/streams/decode-ignore-bom.any.js: Added.
(async pipeAndAssemble):
* web-platform-tests/encoding/streams/decode-ignore-bom.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/decode-ignore-bom.any.worker.html: Added.
* web-platform-tests/encoding/streams/decode-incomplete-input.any.js: Added.
(promise_test.async t):
* web-platform-tests/encoding/streams/decode-incomplete-input.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/decode-incomplete-input.any.worker.html: Added.
* web-platform-tests/encoding/streams/decode-non-utf8.any.js: Added.
(const.encoding.of.encodings.promise_test.async const):
(const.encoding.of.encodings.promise_test):
(const.encoding.of.encodings.promise_test.async t):
* web-platform-tests/encoding/streams/decode-non-utf8.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/decode-non-utf8.any.worker.html: Added.
* web-platform-tests/encoding/streams/decode-split-character.any.js: Added.
* web-platform-tests/encoding/streams/decode-split-character.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/decode-split-character.any.worker.html: Added.
* web-platform-tests/encoding/streams/decode-utf8.any.js: Added.
(string_appeared_here.forEach.async promise_test):
(string_appeared_here.forEach):
(async promise_test):
* web-platform-tests/encoding/streams/decode-utf8.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/decode-utf8.any.worker.html: Added.
* web-platform-tests/encoding/streams/encode-bad-chunks.any.js: Added.
(promise_test.t.const.writePromise.writer.write.toString):
* web-platform-tests/encoding/streams/encode-bad-chunks.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/encode-bad-chunks.any.worker.html: Added.
* web-platform-tests/encoding/streams/encode-utf8.any.js: Added.
(of.testCases.promise_test.async const):
(of.testCases.promise_test):
* web-platform-tests/encoding/streams/encode-utf8.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/encode-utf8.any.worker.html: Added.
* web-platform-tests/encoding/streams/readable-writable-properties.any.js: Added.
(test):
* web-platform-tests/encoding/streams/readable-writable-properties.any.worker-expected.txt: Added.
* web-platform-tests/encoding/streams/readable-writable-properties.any.worker.html: Added.
* web-platform-tests/encoding/streams/realms.window-expected.txt: Added.
* web-platform-tests/encoding/streams/realms.window.html: Added.
* web-platform-tests/encoding/streams/realms.window.js: Added.
(createRealm):
(async createRealms):
(const.id):
(evalInRealm):
(async evalInRealmAndWait):
(async evalInRealmAndReturn):
(async constructAndStore):
(readInReadRealm):
(writeInWriteRealm):
(window.onload):
(runGenericTests.async promise_test):
(async runTextEncoderStreamTests.async promise_test):
(async runTextEncoderStreamTests):
(async runTextDecoderStreamTests.async promise_test):
(async runTextDecoderStreamTests):
* web-platform-tests/encoding/streams/resources/readable-stream-from-array.js: Added.
(readableStreamFromArray):
* web-platform-tests/encoding/streams/resources/readable-stream-to-array.js: Added.
(readableStreamToArray):
* web-platform-tests/encoding/streams/resources/w3c-import.log: Added.
* web-platform-tests/encoding/streams/w3c-import.log: Added.
* web-platform-tests/encoding/textdecoder-byte-order-marks.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-byte-order-marks.any.html: Added.
* web-platform-tests/encoding/textdecoder-byte-order-marks.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textdecoder-byte-order-marks.html.
(testCases.forEach):
* web-platform-tests/encoding/textdecoder-byte-order-marks.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-byte-order-marks.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-copy.any-expected.txt:
* web-platform-tests/encoding/textdecoder-copy.any.js:
(string_appeared_here.forEach.arrayBufferOrSharedArrayBuffer.test):
* web-platform-tests/encoding/textdecoder-copy.any.worker-expected.txt:
* web-platform-tests/encoding/textdecoder-fatal-single-byte.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-fatal-single-byte.any.html: Added.
* web-platform-tests/encoding/textdecoder-fatal-single-byte.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-single-byte.html.
(singleByteEncodings.forEach):
* web-platform-tests/encoding/textdecoder-fatal-single-byte.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-fatal-single-byte.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-fatal-streaming.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-fatal-streaming.any.html: Added.
* web-platform-tests/encoding/textdecoder-fatal-streaming.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-streaming.html.
(test):
* web-platform-tests/encoding/textdecoder-fatal-streaming.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-fatal-streaming.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-fatal.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-fatal.any.html: Added.
* web-platform-tests/encoding/textdecoder-fatal.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textdecoder-fatal.html.
(bad.forEach):
(test):
* web-platform-tests/encoding/textdecoder-fatal.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-fatal.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-ignorebom.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-ignorebom.any.html: Added.
* web-platform-tests/encoding/textdecoder-ignorebom.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textdecoder-ignorebom.html.
(cases.forEach):
(test):
* web-platform-tests/encoding/textdecoder-ignorebom.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-ignorebom.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-labels.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-labels.any.html: Added.
* web-platform-tests/encoding/textdecoder-labels.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textdecoder-labels.html.
(encodings_table.forEach):
* web-platform-tests/encoding/textdecoder-labels.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-labels.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-streaming.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-streaming.any.html: Added.
* web-platform-tests/encoding/textdecoder-streaming.any.js: Added.
(string_appeared_here.forEach.):
(string_appeared_here.forEach):
* web-platform-tests/encoding/textdecoder-streaming.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-streaming.any.worker.html: Added.
* web-platform-tests/encoding/textdecoder-streaming.html: Removed.
* web-platform-tests/encoding/textdecoder-utf16-surrogates.any-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-utf16-surrogates.any.html: Added.
* web-platform-tests/encoding/textdecoder-utf16-surrogates.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textdecoder-utf16-surrogates.html.
(bad.forEach):
* web-platform-tests/encoding/textdecoder-utf16-surrogates.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textdecoder-utf16-surrogates.any.worker.html: Added.
* web-platform-tests/encoding/textencoder-constructor-non-utf.any-expected.txt: Added.
* web-platform-tests/encoding/textencoder-constructor-non-utf.any.html: Added.
* web-platform-tests/encoding/textencoder-constructor-non-utf.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textencoder-constructor-non-utf.html.
(encodings_table.forEach):
* web-platform-tests/encoding/textencoder-constructor-non-utf.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textencoder-constructor-non-utf.any.worker.html: Added.
* web-platform-tests/encoding/textencoder-utf16-surrogates.any-expected.txt: Added.
* web-platform-tests/encoding/textencoder-utf16-surrogates.any.html: Added.
* web-platform-tests/encoding/textencoder-utf16-surrogates.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/encoding/textencoder-utf16-surrogates.html.
(test):
* web-platform-tests/encoding/textencoder-utf16-surrogates.any.worker-expected.txt: Added.
* web-platform-tests/encoding/textencoder-utf16-surrogates.any.worker.html: Added.
* web-platform-tests/encoding/utf-32-expected.txt:
* web-platform-tests/encoding/utf-32-from-win1252-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/encoding/utf-32-expected.txt.
* web-platform-tests/encoding/utf-32-from-win1252.html: Added.
* web-platform-tests/encoding/utf-32.html:
* web-platform-tests/encoding/w3c-import.log:
LayoutTests:
* platform/gtk/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-single-byte.any-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-single-byte.any.worker-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-single-byte.any-expected.txt: Added.
* platform/wpe/imported/w3c/web-platform-tests/encoding/textdecoder-fatal-single-byte.any.worker-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@256730 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/imported/w3c/web-platform-tests/encoding/api-basics.any.js b/LayoutTests/imported/w3c/web-platform-tests/encoding/api-basics.any.js
new file mode 100644
index 0000000..941b878
--- /dev/null
+++ b/LayoutTests/imported/w3c/web-platform-tests/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]
+);