Update web-platform-tests to revision 33c263fb308d1c3f6ac6d2590d7292317262819d

This commit is contained in:
WPT Sync Bot 2019-08-23 10:24:44 +00:00
parent 5bf00c07c2
commit 482fda3a78
524 changed files with 14686 additions and 3270 deletions

View file

@ -15,18 +15,30 @@ cases.forEach(function(testCase) {
decoder.decode(bytes),
BOM + 'abc',
testCase.encoding + ': BOM should be present in decoded string if ignored');
assert_equals(
decoder.decode(bytes),
BOM + 'abc',
testCase.encoding + ': BOM should be present in decoded string if ignored by a reused decoder');
decoder = new TextDecoder(testCase.encoding, {ignoreBOM: false});
assert_equals(
decoder.decode(bytes),
'abc',
testCase.encoding + ': BOM should be absent from decoded string if not ignored');
assert_equals(
decoder.decode(bytes),
'abc',
testCase.encoding + ': BOM should be absent from decoded string if not ignored by a reused decoder');
decoder = new TextDecoder(testCase.encoding);
assert_equals(
decoder.decode(bytes),
'abc',
testCase.encoding + ': BOM should be absent from decoded string by default');
assert_equals(
decoder.decode(bytes),
'abc',
testCase.encoding + ': BOM should be absent from decoded string by default with a reused decoder');
}, 'BOM is ignored if ignoreBOM option is specified: ' + testCase.encoding);
});