mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Update web-platform-tests to revision ac16628eb7eb601957382053011363d2bcf8ce44
This commit is contained in:
parent
ea7e753cea
commit
7e7c8873e4
4408 changed files with 664787 additions and 857286 deletions
|
@ -1,6 +1,15 @@
|
|||
// META: timeout=long
|
||||
// META: title=Encoding API: Fatal flag for single byte encodings
|
||||
// META: timeout=long
|
||||
// META: variant=?1-1000
|
||||
// META: variant=?1001-2000
|
||||
// META: variant=?2001-3000
|
||||
// META: variant=?3001-4000
|
||||
// META: variant=?4001-5000
|
||||
// META: variant=?5001-6000
|
||||
// META: variant=?6001-7000
|
||||
// META: variant=?7001-last
|
||||
// META: script=/common/subset-tests.js
|
||||
|
||||
var singleByteEncodings = [
|
||||
{encoding: 'IBM866', bad: []},
|
||||
|
@ -36,14 +45,14 @@ var singleByteEncodings = [
|
|||
singleByteEncodings.forEach(function(t) {
|
||||
for (var i = 0; i < 256; ++i) {
|
||||
if (t.bad.indexOf(i) != -1) {
|
||||
test(function() {
|
||||
subsetTest(test, function() {
|
||||
assert_throws_js(TypeError, function() {
|
||||
new TextDecoder(t.encoding, {fatal: true}).decode(new Uint8Array([i]));
|
||||
});
|
||||
}, 'Throw due to fatal flag: ' + t.encoding + ' doesn\'t have a pointer ' + i);
|
||||
}
|
||||
else {
|
||||
test(function() {
|
||||
subsetTest(test, function() {
|
||||
assert_equals(typeof new TextDecoder(t.encoding, {fatal: true}).decode(new Uint8Array([i])), "string");
|
||||
}, 'Not throw: ' + t.encoding + ' has a pointer ' + i);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue