diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index d1dd72a30b6..6c7204f7765 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -315,6 +315,7 @@ pub mod servohtmlparser; pub mod storage; pub mod storageevent; pub mod text; +pub mod textdecoder; pub mod textencoder; pub mod treewalker; pub mod uievent; diff --git a/components/script/dom/textdecoder.rs b/components/script/dom/textdecoder.rs new file mode 100644 index 00000000000..7aa6b4f92bc --- /dev/null +++ b/components/script/dom/textdecoder.rs @@ -0,0 +1,65 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use dom::bindings::codegen::Bindings::TextDecoderBinding; +use dom::bindings::codegen::Bindings::TextDecoderBinding::TextDecoderMethods; +use dom::bindings::error::{Error, Fallible}; +use dom::bindings::global::GlobalRef; +use dom::bindings::js::{JSRef, Temporary}; +use dom::bindings::trace::JSTraceable; +use dom::bindings::utils::{Reflector, reflect_dom_object}; + +use util::str::DOMString; + +use encoding::Encoding; +use encoding::types::EncodingRef; +use encoding::label::encoding_from_whatwg_label; + +use std::borrow::ToOwned; + +#[dom_struct] +pub struct TextDecoder { + reflector_: Reflector, + encoding: EncodingRef, + fatal: bool, +} + +impl TextDecoder { + fn new_inherited(encoding: EncodingRef, fatal: bool) -> TextDecoder { + TextDecoder { + reflector_: Reflector::new(), + encoding: encoding, + fatal: fatal, + } + } + + pub fn new(global: GlobalRef, encoding: EncodingRef, fatal: bool) -> Temporary { + reflect_dom_object(box TextDecoder::new_inherited(encoding, fatal), + global, + TextDecoderBinding::Wrap) + } + + /// https://encoding.spec.whatwg.org/#dom-textdecoder + pub fn Constructor(global: GlobalRef, + label: DOMString, + options: &TextDecoderBinding::TextDecoderOptions) + -> Fallible> { + let encoding = match encoding_from_whatwg_label(&label) { + Some(enc) => enc, + // FIXME: Should throw a RangeError as per spec + None => return Err(Error::Syntax), + }; + Ok(TextDecoder::new(global, encoding, options.fatal)) + } +} + +impl<'a> TextDecoderMethods for JSRef<'a, TextDecoder> { + fn Encoding(self) -> DOMString { + self.encoding.whatwg_name().unwrap().to_owned() + } + + fn Fatal(self) -> bool { + self.fatal + } +} diff --git a/components/script/dom/webidls/TextDecoder.webidl b/components/script/dom/webidls/TextDecoder.webidl new file mode 100644 index 00000000000..6450c2ef0b6 --- /dev/null +++ b/components/script/dom/webidls/TextDecoder.webidl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// https://encoding.spec.whatwg.org/#interface-textdecoder +dictionary TextDecoderOptions { + boolean fatal = false; + //boolean ignoreBOM = false; +}; + +[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options)/*, + Exposed=Window,Worker*/] +interface TextDecoder { + readonly attribute DOMString encoding; + readonly attribute boolean fatal; + //readonly attribute boolean ignoreBOM; + //USVString decode(optional BufferSource input, optional TextDecodeOptions options); +}; diff --git a/tests/wpt/metadata/encoding/api-basics.html.ini b/tests/wpt/metadata/encoding/api-basics.html.ini index 03947330276..0045f9e5794 100644 --- a/tests/wpt/metadata/encoding/api-basics.html.ini +++ b/tests/wpt/metadata/encoding/api-basics.html.ini @@ -1,8 +1,5 @@ [api-basics.html] type: testharness - [Default encodings] - expected: FAIL - [Default inputs] expected: FAIL diff --git a/tests/wpt/metadata/encoding/idlharness.html.ini b/tests/wpt/metadata/encoding/idlharness.html.ini index 2c00e08d92e..f7c414c2d63 100644 --- a/tests/wpt/metadata/encoding/idlharness.html.ini +++ b/tests/wpt/metadata/encoding/idlharness.html.ini @@ -1,41 +1,14 @@ [idlharness.html] type: testharness - [TextDecoder interface: existence and properties of interface object] - expected: FAIL - [TextDecoder interface object length] expected: FAIL - [TextDecoder interface: existence and properties of interface prototype object] - expected: FAIL - - [TextDecoder interface: existence and properties of interface prototype object\'s "constructor" property] - expected: FAIL - - [TextDecoder interface: attribute encoding] - expected: FAIL - - [TextDecoder interface: attribute fatal] - expected: FAIL - [TextDecoder interface: attribute ignoreBOM] expected: FAIL [TextDecoder interface: operation decode(BufferSource,TextDecodeOptions)] expected: FAIL - [TextDecoder must be primary interface of new TextDecoder()] - expected: FAIL - - [Stringification of new TextDecoder()] - expected: FAIL - - [TextDecoder interface: new TextDecoder() must inherit property "encoding" with the proper type (0)] - expected: FAIL - - [TextDecoder interface: new TextDecoder() must inherit property "fatal" with the proper type (1)] - expected: FAIL - [TextDecoder interface: new TextDecoder() must inherit property "ignoreBOM" with the proper type (2)] expected: FAIL diff --git a/tests/wpt/metadata/encoding/textdecoder-fatal.html.ini b/tests/wpt/metadata/encoding/textdecoder-fatal.html.ini deleted file mode 100644 index 3f7dc6f45f6..00000000000 --- a/tests/wpt/metadata/encoding/textdecoder-fatal.html.ini +++ /dev/null @@ -1,107 +0,0 @@ -[textdecoder-fatal.html] - type: testharness - [Fatal flag: utf-8 - invalid code] - expected: FAIL - - [Fatal flag: utf-8 - ends early] - expected: FAIL - - [Fatal flag: utf-8 - ends early 2] - expected: FAIL - - [Fatal flag: utf-8 - invalid trail] - expected: FAIL - - [Fatal flag: utf-8 - invalid trail 2] - expected: FAIL - - [Fatal flag: utf-8 - invalid trail 3] - expected: FAIL - - [Fatal flag: utf-8 - invalid trail 4] - expected: FAIL - - [Fatal flag: utf-8 - invalid trail 5] - expected: FAIL - - [Fatal flag: utf-8 - invalid trail 6] - expected: FAIL - - [Fatal flag: utf-8 - > 0x10FFFF] - expected: FAIL - - [Fatal flag: utf-8 - obsolete lead byte] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+0000 - 2 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+0000 - 3 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+0000 - 4 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+0000 - 5 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+0000 - 6 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+007F - 2 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+007F - 3 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+007F - 4 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+007F - 5 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+007F - 6 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+07FF - 3 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+07FF - 4 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+07FF - 5 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+07FF - 6 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+FFFF - 4 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+FFFF - 5 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+FFFF - 6 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+10FFFF - 5 bytes] - expected: FAIL - - [Fatal flag: utf-8 - overlong U+10FFFF - 6 bytes] - expected: FAIL - - [Fatal flag: utf-8 - lead surrogate] - expected: FAIL - - [Fatal flag: utf-8 - trail surrogate] - expected: FAIL - - [Fatal flag: utf-8 - surrogate pair] - expected: FAIL - - [Fatal flag: utf-16le - truncated code unit] - expected: FAIL - - [The fatal attribute of TextDecoder] - expected: FAIL - diff --git a/tests/wpt/metadata/encoding/textdecoder-labels.html.ini b/tests/wpt/metadata/encoding/textdecoder-labels.html.ini index 61506476753..4f3fd8edbbf 100644 --- a/tests/wpt/metadata/encoding/textdecoder-labels.html.ini +++ b/tests/wpt/metadata/encoding/textdecoder-labels.html.ini @@ -1,515 +1,5 @@ [textdecoder-labels.html] type: testharness - [name=utf-8 label=unicode-1-1-utf-8] - expected: FAIL - - [name=utf-8 label=utf-8] - expected: FAIL - - [name=utf-8 label=utf8] - expected: FAIL - - [name=ibm866 label=866] - expected: FAIL - - [name=ibm866 label=cp866] - expected: FAIL - - [name=ibm866 label=csibm866] - expected: FAIL - - [name=ibm866 label=ibm866] - expected: FAIL - - [name=iso-8859-2 label=csisolatin2] - expected: FAIL - - [name=iso-8859-2 label=iso-8859-2] - expected: FAIL - - [name=iso-8859-2 label=iso-ir-101] - expected: FAIL - - [name=iso-8859-2 label=iso8859-2] - expected: FAIL - - [name=iso-8859-2 label=iso88592] - expected: FAIL - - [name=iso-8859-2 label=iso_8859-2] - expected: FAIL - - [name=iso-8859-2 label=iso_8859-2:1987] - expected: FAIL - - [name=iso-8859-2 label=l2] - expected: FAIL - - [name=iso-8859-2 label=latin2] - expected: FAIL - - [name=iso-8859-3 label=csisolatin3] - expected: FAIL - - [name=iso-8859-3 label=iso-8859-3] - expected: FAIL - - [name=iso-8859-3 label=iso-ir-109] - expected: FAIL - - [name=iso-8859-3 label=iso8859-3] - expected: FAIL - - [name=iso-8859-3 label=iso88593] - expected: FAIL - - [name=iso-8859-3 label=iso_8859-3] - expected: FAIL - - [name=iso-8859-3 label=iso_8859-3:1988] - expected: FAIL - - [name=iso-8859-3 label=l3] - expected: FAIL - - [name=iso-8859-3 label=latin3] - expected: FAIL - - [name=iso-8859-4 label=csisolatin4] - expected: FAIL - - [name=iso-8859-4 label=iso-8859-4] - expected: FAIL - - [name=iso-8859-4 label=iso-ir-110] - expected: FAIL - - [name=iso-8859-4 label=iso8859-4] - expected: FAIL - - [name=iso-8859-4 label=iso88594] - expected: FAIL - - [name=iso-8859-4 label=iso_8859-4] - expected: FAIL - - [name=iso-8859-4 label=iso_8859-4:1988] - expected: FAIL - - [name=iso-8859-4 label=l4] - expected: FAIL - - [name=iso-8859-4 label=latin4] - expected: FAIL - - [name=iso-8859-5 label=csisolatincyrillic] - expected: FAIL - - [name=iso-8859-5 label=cyrillic] - expected: FAIL - - [name=iso-8859-5 label=iso-8859-5] - expected: FAIL - - [name=iso-8859-5 label=iso-ir-144] - expected: FAIL - - [name=iso-8859-5 label=iso8859-5] - expected: FAIL - - [name=iso-8859-5 label=iso88595] - expected: FAIL - - [name=iso-8859-5 label=iso_8859-5] - expected: FAIL - - [name=iso-8859-5 label=iso_8859-5:1988] - expected: FAIL - - [name=iso-8859-6 label=arabic] - expected: FAIL - - [name=iso-8859-6 label=asmo-708] - expected: FAIL - - [name=iso-8859-6 label=csiso88596e] - expected: FAIL - - [name=iso-8859-6 label=csiso88596i] - expected: FAIL - - [name=iso-8859-6 label=csisolatinarabic] - expected: FAIL - - [name=iso-8859-6 label=ecma-114] - expected: FAIL - - [name=iso-8859-6 label=iso-8859-6] - expected: FAIL - - [name=iso-8859-6 label=iso-8859-6-e] - expected: FAIL - - [name=iso-8859-6 label=iso-8859-6-i] - expected: FAIL - - [name=iso-8859-6 label=iso-ir-127] - expected: FAIL - - [name=iso-8859-6 label=iso8859-6] - expected: FAIL - - [name=iso-8859-6 label=iso88596] - expected: FAIL - - [name=iso-8859-6 label=iso_8859-6] - expected: FAIL - - [name=iso-8859-6 label=iso_8859-6:1987] - expected: FAIL - - [name=iso-8859-7 label=csisolatingreek] - expected: FAIL - - [name=iso-8859-7 label=ecma-118] - expected: FAIL - - [name=iso-8859-7 label=elot_928] - expected: FAIL - - [name=iso-8859-7 label=greek] - expected: FAIL - - [name=iso-8859-7 label=greek8] - expected: FAIL - - [name=iso-8859-7 label=iso-8859-7] - expected: FAIL - - [name=iso-8859-7 label=iso-ir-126] - expected: FAIL - - [name=iso-8859-7 label=iso8859-7] - expected: FAIL - - [name=iso-8859-7 label=iso88597] - expected: FAIL - - [name=iso-8859-7 label=iso_8859-7] - expected: FAIL - - [name=iso-8859-7 label=iso_8859-7:1987] - expected: FAIL - - [name=iso-8859-7 label=sun_eu_greek] - expected: FAIL - - [name=iso-8859-8 label=csiso88598e] - expected: FAIL - - [name=iso-8859-8 label=csisolatinhebrew] - expected: FAIL - - [name=iso-8859-8 label=hebrew] - expected: FAIL - - [name=iso-8859-8 label=iso-8859-8] - expected: FAIL - - [name=iso-8859-8 label=iso-8859-8-e] - expected: FAIL - - [name=iso-8859-8 label=iso-ir-138] - expected: FAIL - - [name=iso-8859-8 label=iso8859-8] - expected: FAIL - - [name=iso-8859-8 label=iso88598] - expected: FAIL - - [name=iso-8859-8 label=iso_8859-8] - expected: FAIL - - [name=iso-8859-8 label=iso_8859-8:1988] - expected: FAIL - - [name=iso-8859-8 label=visual] - expected: FAIL - - [name=iso-8859-8-i label=csiso88598i] - expected: FAIL - - [name=iso-8859-8-i label=iso-8859-8-i] - expected: FAIL - - [name=iso-8859-8-i label=logical] - expected: FAIL - - [name=iso-8859-10 label=csisolatin6] - expected: FAIL - - [name=iso-8859-10 label=iso-8859-10] - expected: FAIL - - [name=iso-8859-10 label=iso-ir-157] - expected: FAIL - - [name=iso-8859-10 label=iso8859-10] - expected: FAIL - - [name=iso-8859-10 label=iso885910] - expected: FAIL - - [name=iso-8859-10 label=l6] - expected: FAIL - - [name=iso-8859-10 label=latin6] - expected: FAIL - - [name=iso-8859-13 label=iso-8859-13] - expected: FAIL - - [name=iso-8859-13 label=iso8859-13] - expected: FAIL - - [name=iso-8859-13 label=iso885913] - expected: FAIL - - [name=iso-8859-14 label=iso-8859-14] - expected: FAIL - - [name=iso-8859-14 label=iso8859-14] - expected: FAIL - - [name=iso-8859-14 label=iso885914] - expected: FAIL - - [name=iso-8859-15 label=csisolatin9] - expected: FAIL - - [name=iso-8859-15 label=iso-8859-15] - expected: FAIL - - [name=iso-8859-15 label=iso8859-15] - expected: FAIL - - [name=iso-8859-15 label=iso885915] - expected: FAIL - - [name=iso-8859-15 label=iso_8859-15] - expected: FAIL - - [name=iso-8859-15 label=l9] - expected: FAIL - - [name=iso-8859-16 label=iso-8859-16] - expected: FAIL - - [name=koi8-r label=cskoi8r] - expected: FAIL - - [name=koi8-r label=koi] - expected: FAIL - - [name=koi8-r label=koi8] - expected: FAIL - - [name=koi8-r label=koi8-r] - expected: FAIL - - [name=koi8-r label=koi8_r] - expected: FAIL - - [name=koi8-u label=koi8-u] - expected: FAIL - - [name=macintosh label=csmacintosh] - expected: FAIL - - [name=macintosh label=mac] - expected: FAIL - - [name=macintosh label=macintosh] - expected: FAIL - - [name=macintosh label=x-mac-roman] - expected: FAIL - - [name=windows-874 label=dos-874] - expected: FAIL - - [name=windows-874 label=iso-8859-11] - expected: FAIL - - [name=windows-874 label=iso8859-11] - expected: FAIL - - [name=windows-874 label=iso885911] - expected: FAIL - - [name=windows-874 label=tis-620] - expected: FAIL - - [name=windows-874 label=windows-874] - expected: FAIL - - [name=windows-1250 label=cp1250] - expected: FAIL - - [name=windows-1250 label=windows-1250] - expected: FAIL - - [name=windows-1250 label=x-cp1250] - expected: FAIL - - [name=windows-1251 label=cp1251] - expected: FAIL - - [name=windows-1251 label=windows-1251] - expected: FAIL - - [name=windows-1251 label=x-cp1251] - expected: FAIL - - [name=windows-1252 label=ansi_x3.4-1968] - expected: FAIL - - [name=windows-1252 label=ascii] - expected: FAIL - - [name=windows-1252 label=cp1252] - expected: FAIL - - [name=windows-1252 label=cp819] - expected: FAIL - - [name=windows-1252 label=csisolatin1] - expected: FAIL - - [name=windows-1252 label=ibm819] - expected: FAIL - - [name=windows-1252 label=iso-8859-1] - expected: FAIL - - [name=windows-1252 label=iso-ir-100] - expected: FAIL - - [name=windows-1252 label=iso8859-1] - expected: FAIL - - [name=windows-1252 label=iso88591] - expected: FAIL - - [name=windows-1252 label=iso_8859-1] - expected: FAIL - - [name=windows-1252 label=iso_8859-1:1987] - expected: FAIL - - [name=windows-1252 label=l1] - expected: FAIL - - [name=windows-1252 label=latin1] - expected: FAIL - - [name=windows-1252 label=us-ascii] - expected: FAIL - - [name=windows-1252 label=windows-1252] - expected: FAIL - - [name=windows-1252 label=x-cp1252] - expected: FAIL - - [name=windows-1253 label=cp1253] - expected: FAIL - - [name=windows-1253 label=windows-1253] - expected: FAIL - - [name=windows-1253 label=x-cp1253] - expected: FAIL - - [name=windows-1254 label=cp1254] - expected: FAIL - - [name=windows-1254 label=csisolatin5] - expected: FAIL - - [name=windows-1254 label=iso-8859-9] - expected: FAIL - - [name=windows-1254 label=iso-ir-148] - expected: FAIL - - [name=windows-1254 label=iso8859-9] - expected: FAIL - - [name=windows-1254 label=iso88599] - expected: FAIL - - [name=windows-1254 label=iso_8859-9] - expected: FAIL - - [name=windows-1254 label=iso_8859-9:1989] - expected: FAIL - - [name=windows-1254 label=l5] - expected: FAIL - - [name=windows-1254 label=latin5] - expected: FAIL - - [name=windows-1254 label=windows-1254] - expected: FAIL - - [name=windows-1254 label=x-cp1254] - expected: FAIL - - [name=windows-1255 label=cp1255] - expected: FAIL - - [name=windows-1255 label=windows-1255] - expected: FAIL - - [name=windows-1255 label=x-cp1255] - expected: FAIL - - [name=windows-1256 label=cp1256] - expected: FAIL - - [name=windows-1256 label=windows-1256] - expected: FAIL - - [name=windows-1256 label=x-cp1256] - expected: FAIL - - [name=windows-1257 label=cp1257] - expected: FAIL - - [name=windows-1257 label=windows-1257] - expected: FAIL - - [name=windows-1257 label=x-cp1257] - expected: FAIL - - [name=windows-1258 label=cp1258] - expected: FAIL - - [name=windows-1258 label=windows-1258] - expected: FAIL - - [name=windows-1258 label=x-cp1258] - expected: FAIL - - [name=x-mac-cyrillic label=x-mac-cyrillic] - expected: FAIL - - [name=x-mac-cyrillic label=x-mac-ukrainian] - expected: FAIL - [name=gbk label=chinese] expected: FAIL @@ -537,99 +27,9 @@ [name=gbk label=x-gbk] expected: FAIL - [name=gb18030 label=gb18030] - expected: FAIL - - [name=big5 label=big5] - expected: FAIL - - [name=big5 label=big5-hkscs] - expected: FAIL - - [name=big5 label=cn-big5] - expected: FAIL - - [name=big5 label=csbig5] - expected: FAIL - - [name=big5 label=x-x-big5] - expected: FAIL - - [name=euc-jp label=cseucpkdfmtjapanese] - expected: FAIL - - [name=euc-jp label=euc-jp] - expected: FAIL - - [name=euc-jp label=x-euc-jp] - expected: FAIL - - [name=iso-2022-jp label=csiso2022jp] - expected: FAIL - - [name=iso-2022-jp label=iso-2022-jp] - expected: FAIL - - [name=shift_jis label=csshiftjis] - expected: FAIL - - [name=shift_jis label=ms_kanji] - expected: FAIL - - [name=shift_jis label=shift-jis] - expected: FAIL - - [name=shift_jis label=shift_jis] - expected: FAIL - - [name=shift_jis label=sjis] - expected: FAIL - - [name=shift_jis label=windows-31j] - expected: FAIL - - [name=shift_jis label=x-sjis] - expected: FAIL - - [name=euc-kr label=cseuckr] - expected: FAIL - - [name=euc-kr label=csksc56011987] - expected: FAIL - - [name=euc-kr label=euc-kr] - expected: FAIL - - [name=euc-kr label=iso-ir-149] - expected: FAIL - - [name=euc-kr label=korean] - expected: FAIL - - [name=euc-kr label=ks_c_5601-1987] - expected: FAIL - - [name=euc-kr label=ks_c_5601-1989] - expected: FAIL - - [name=euc-kr label=ksc5601] - expected: FAIL - - [name=euc-kr label=ksc_5601] - expected: FAIL - - [name=euc-kr label=windows-949] - expected: FAIL - - [name=utf-16be label=utf-16be] - expected: FAIL - [name=utf-16le label=utf-16] expected: FAIL [name=utf-16le label=utf-16le] expected: FAIL - [name=x-user-defined label=x-user-defined] - expected: FAIL - diff --git a/tests/wpt/metadata/encoding/textdecoder-utf16-surrogates.html.ini b/tests/wpt/metadata/encoding/textdecoder-utf16-surrogates.html.ini index 0630043c8c7..9c32d21843c 100644 --- a/tests/wpt/metadata/encoding/textdecoder-utf16-surrogates.html.ini +++ b/tests/wpt/metadata/encoding/textdecoder-utf16-surrogates.html.ini @@ -3,30 +3,15 @@ [utf-16le - lone surrogate lead] expected: FAIL - [utf-16le - lone surrogate lead (fatal flag set)] - expected: FAIL - [utf-16le - lone surrogate trail] expected: FAIL - [utf-16le - lone surrogate trail (fatal flag set)] - expected: FAIL - [utf-16le - unmatched surrogate lead] expected: FAIL - [utf-16le - unmatched surrogate lead (fatal flag set)] - expected: FAIL - [utf-16le - unmatched surrogate trail] expected: FAIL - [utf-16le - unmatched surrogate trail (fatal flag set)] - expected: FAIL - [utf-16le - swapped surrogate pair] expected: FAIL - [utf-16le - swapped surrogate pair (fatal flag set)] - expected: FAIL - diff --git a/tests/wpt/metadata/encoding/textencoder-constructor-non-utf.html.ini b/tests/wpt/metadata/encoding/textencoder-constructor-non-utf.html.ini index 1af7e7f02b9..4d846b4443c 100644 --- a/tests/wpt/metadata/encoding/textencoder-constructor-non-utf.html.ini +++ b/tests/wpt/metadata/encoding/textencoder-constructor-non-utf.html.ini @@ -1,8 +1,5 @@ [textencoder-constructor-non-utf.html] type: testharness - [UTF encodings are supported for encode and decode: utf-8] - expected: FAIL - [Non-UTF encodings supported only for decode, not encode: ibm866] expected: FAIL @@ -108,9 +105,6 @@ [Non-UTF encodings supported only for decode, not encode: euc-kr] expected: FAIL - [UTF encodings are supported for encode and decode: utf-16be] - expected: FAIL - [UTF encodings are supported for encode and decode: utf-16le] expected: FAIL