Auto merge of #5599 - servo:textdecoder, r=jdm

This commit is contained in:
bors-servo 2015-04-08 20:00:40 -05:00
commit 254f2a3b5f
16 changed files with 127 additions and 905 deletions

View file

@ -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;

View file

@ -0,0 +1,99 @@
/* 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::str::USVString;
use dom::bindings::trace::JSTraceable;
use dom::bindings::utils::{Reflector, reflect_dom_object};
use util::str::DOMString;
use encoding::Encoding;
use encoding::types::{EncodingRef, DecoderTrap};
use encoding::label::encoding_from_whatwg_label;
use js::jsapi::{JSContext, JSObject};
use js::jsfriendapi::bindgen::JS_GetObjectAsArrayBufferView;
use std::borrow::ToOwned;
use std::ptr;
use std::slice;
#[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<TextDecoder> {
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<Temporary<TextDecoder>> {
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
}
#[allow(unsafe_code)]
fn Decode(self, cx: *mut JSContext, input: Option<*mut JSObject>)
-> Fallible<USVString> {
let input = match input {
Some(input) => input,
None => return Ok(USVString("".to_owned())),
};
let mut length = 0;
let mut data = ptr::null_mut();
if unsafe { JS_GetObjectAsArrayBufferView(cx, input, &mut length, &mut data).is_null() } {
return Err(Error::Type("Argument to TextDecoder.decode is not an ArrayBufferView".to_owned()));
}
let buffer = unsafe {
slice::from_raw_parts(data as *const _, length as usize)
};
let trap = if self.fatal {
DecoderTrap::Strict
} else {
DecoderTrap::Replace
};
match self.encoding.decode(buffer, trap) {
Ok(s) => Ok(USVString(s)),
Err(_) => Err(Error::Type("Decoding failed".to_owned())),
}
}
}

View file

@ -0,0 +1,21 @@
/* -*- 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);
[Throws]
USVString decode(optional object input);
};

View file

@ -479,7 +479,7 @@ dependencies = [
[[package]]
name = "js"
version = "0.1.0"
source = "git+https://github.com/servo/rust-mozjs#879b256e6bc5b38f792b68da130eb7a70633769b"
source = "git+https://github.com/servo/rust-mozjs#9512c3c770774ed73a2fdcc635eee178cbd02ab1"
dependencies = [
"libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@ -617,7 +617,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "mozjs_sys"
version = "0.0.0"
source = "git+https://github.com/servo/mozjs#40e0680008cb129ddf9ccf40c6b0095e14d1cd97"
source = "git+https://github.com/servo/mozjs#19edb950930f03f0ad305ffbd9548b92fdb0a250"
[[package]]
name = "msg"

4
ports/cef/Cargo.lock generated
View file

@ -482,7 +482,7 @@ dependencies = [
[[package]]
name = "js"
version = "0.1.0"
source = "git+https://github.com/servo/rust-mozjs#879b256e6bc5b38f792b68da130eb7a70633769b"
source = "git+https://github.com/servo/rust-mozjs#9512c3c770774ed73a2fdcc635eee178cbd02ab1"
dependencies = [
"libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@ -620,7 +620,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "mozjs_sys"
version = "0.0.0"
source = "git+https://github.com/servo/mozjs#40e0680008cb129ddf9ccf40c6b0095e14d1cd97"
source = "git+https://github.com/servo/mozjs#19edb950930f03f0ad305ffbd9548b92fdb0a250"
[[package]]
name = "msg"

4
ports/gonk/Cargo.lock generated
View file

@ -415,7 +415,7 @@ dependencies = [
[[package]]
name = "js"
version = "0.1.0"
source = "git+https://github.com/servo/rust-mozjs#879b256e6bc5b38f792b68da130eb7a70633769b"
source = "git+https://github.com/servo/rust-mozjs#9512c3c770774ed73a2fdcc635eee178cbd02ab1"
dependencies = [
"libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@ -545,7 +545,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "mozjs_sys"
version = "0.0.0"
source = "git+https://github.com/servo/mozjs#40e0680008cb129ddf9ccf40c6b0095e14d1cd97"
source = "git+https://github.com/servo/mozjs#19edb950930f03f0ad305ffbd9548b92fdb0a250"
[[package]]
name = "msg"

View file

@ -1,8 +1,5 @@
[api-basics.html]
type: testharness
[Default encodings]
expected: FAIL
[Default inputs]
expected: FAIL

View file

@ -1,20 +0,0 @@
[api-surrogates-utf8.html]
type: testharness
[Invalid surrogates encoded into UTF-8: Sanity check]
expected: FAIL
[Invalid surrogates encoded into UTF-8: Surrogate half (low)]
expected: FAIL
[Invalid surrogates encoded into UTF-8: Surrogate half (high)]
expected: FAIL
[Invalid surrogates encoded into UTF-8: Surrogate half (low), in a string]
expected: FAIL
[Invalid surrogates encoded into UTF-8: Surrogate half (high), in a string]
expected: FAIL
[Invalid surrogates encoded into UTF-8: Wrong order]
expected: FAIL

View file

@ -1,50 +1,17 @@
[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
[TextDecoder interface: new TextDecoder() must inherit property "decode" with the proper type (3)]
expected: FAIL
[TextDecoder interface: calling decode(BufferSource,TextDecodeOptions) on new TextDecoder() with too few arguments must throw TypeError]
expected: FAIL
[TextEncoder interface object length]
expected: FAIL

View file

@ -3,21 +3,12 @@
[iso-2022-jp decoder: Error ESC]
expected: FAIL
[iso-2022-jp decoder: Error ESC, character]
expected: FAIL
[iso-2022-jp decoder: ASCII ESC, character]
expected: FAIL
[iso-2022-jp decoder: Double ASCII ESC, character]
expected: FAIL
[iso-2022-jp decoder: character, ASCII ESC, character]
expected: FAIL
[iso-2022-jp decoder: characters]
expected: FAIL
[iso-2022-jp decoder: SO / SI]
expected: FAIL
@ -27,12 +18,6 @@
[iso-2022-jp decoder: Roman ESC, SO / SI]
expected: FAIL
[iso-2022-jp decoder: Roman ESC, error ESC, Katakana ESC]
expected: FAIL
[iso-2022-jp decoder: Katakana ESC, character]
expected: FAIL
[iso-2022-jp decoder: Katakana ESC, multibyte ESC, character]
expected: FAIL
@ -42,18 +27,6 @@
[iso-2022-jp decoder: Katakana ESC, error ESC #2, character]
expected: FAIL
[iso-2022-jp decoder: Katakana ESC, character, Katakana ESC, character]
expected: FAIL
[iso-2022-jp decoder: Katakana ESC, SO / SI]
expected: FAIL
[iso-2022-jp decoder: Multibyte ESC, character]
expected: FAIL
[iso-2022-jp decoder: Multibyte ESC #2, character]
expected: FAIL
[iso-2022-jp decoder: Multibyte ESC, error ESC, character]
expected: FAIL
@ -75,30 +48,6 @@
[iso-2022-jp decoder: Multibyte ESC, lead error byte]
expected: FAIL
[iso-2022-jp decoder: Multibyte ESC, trail error byte]
expected: FAIL
[iso-2022-jp decoder: character, error ESC]
expected: FAIL
[iso-2022-jp decoder: character, error ESC #2]
expected: FAIL
[iso-2022-jp decoder: character, error ESC #3]
expected: FAIL
[iso-2022-jp decoder: character, ASCII ESC]
expected: FAIL
[iso-2022-jp decoder: character, Roman ESC]
expected: FAIL
[iso-2022-jp decoder: character, Katakana ESC]
expected: FAIL
[iso-2022-jp decoder: character, Multibyte ESC]
expected: FAIL
[iso-2022-jp decoder: character, Multibyte ESC #2]
expected: FAIL

View file

@ -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

View file

@ -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

View file

@ -1,47 +1,20 @@
[textdecoder-streaming.html]
type: testharness
[Streaming decode: utf-8, 1 byte window]
expected: FAIL
[Streaming decode: utf-8, 2 byte window]
expected: FAIL
[Streaming decode: utf-8, 3 byte window]
expected: FAIL
[Streaming decode: utf-8, 4 byte window]
expected: FAIL
[Streaming decode: utf-8, 5 byte window]
expected: FAIL
[Streaming decode: utf-16le, 1 byte window]
expected: FAIL
[Streaming decode: utf-16le, 2 byte window]
expected: FAIL
[Streaming decode: utf-16le, 3 byte window]
expected: FAIL
[Streaming decode: utf-16le, 4 byte window]
expected: FAIL
[Streaming decode: utf-16le, 5 byte window]
expected: FAIL
[Streaming decode: utf-16be, 1 byte window]
expected: FAIL
[Streaming decode: utf-16be, 2 byte window]
expected: FAIL
[Streaming decode: utf-16be, 3 byte window]
expected: FAIL
[Streaming decode: utf-16be, 4 byte window]
expected: FAIL
[Streaming decode: utf-16be, 5 byte window]
expected: FAIL

View file

@ -1,32 +0,0 @@
[textdecoder-utf16-surrogates.html]
type: testharness
[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

View file

@ -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

View file

@ -1,20 +0,0 @@
[textencoder-utf16-surrogates.html]
type: testharness
[USVString handling: lone surrogate lead]
expected: FAIL
[USVString handling: lone surrogate trail]
expected: FAIL
[USVString handling: unmatched surrogate lead]
expected: FAIL
[USVString handling: unmatched surrogate trail]
expected: FAIL
[USVString handling: swapped surrogate pair]
expected: FAIL
[USVString handling: properly encoded MUSICAL SYMBOL G CLEF (U+1D11E)]
expected: FAIL