mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 33c263fb308d1c3f6ac6d2590d7292317262819d
This commit is contained in:
parent
5bf00c07c2
commit
482fda3a78
524 changed files with 14686 additions and 3270 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue