Update web-platform-tests to revision 55351d32dd26ea3ad42a8f5973e943ba0342c812

This commit is contained in:
WPT Sync Bot 2020-01-28 08:23:29 +00:00
parent 1b7223a284
commit 81d0cdbb2c
159 changed files with 2809 additions and 967 deletions

View file

@ -37,7 +37,7 @@ function readBlobAsPromise(blob) {
{}
].forEach(value => test(t => {
assert_throws_js(TypeError, () => new File([], "name", {endings: value}),
'File constructor should throw');
'File constructor should throw');
}, `Invalid "endings" value: ${JSON.stringify(value)}`));
test(t => {

View file

@ -15,9 +15,9 @@ test(function() {
test(t => {
assert_throws_js(TypeError, () => new File(),
'Bits argument is required');
'Bits argument is required');
assert_throws_js(TypeError, () => new File([]),
'Name argument is required');
'Name argument is required');
}, 'Required arguments');
function test_first_argument(arg1, expectedSize, testName) {
@ -65,13 +65,13 @@ test_first_argument({[Symbol.iterator]() {
].forEach(arg => {
test(t => {
assert_throws_js(TypeError, () => new File(arg, 'world.html'),
'Constructor should throw for invalid bits argument');
'Constructor should throw for invalid bits argument');
}, `Invalid bits argument: ${JSON.stringify(arg)}`);
});
test(t => {
assert_throws_js(Error, () => new File([to_string_throws], 'name.txt'),
'Constructor should propagate exceptions');
'Constructor should propagate exceptions');
}, 'Bits argument: object that throws');
@ -132,7 +132,7 @@ test(function() {
].forEach(arg => {
test(t => {
assert_throws_js(TypeError, () => new File(['bits'], 'name.txt', arg),
'Constructor should throw for invalid property bag type');
'Constructor should throw for invalid property bag type');
}, `Invalid property bag: ${JSON.stringify(arg)}`);
});
@ -151,8 +151,8 @@ test(function() {
test(t => {
assert_throws_js(Error,
() => new File(['bits'], 'name.txt', {type: to_string_throws}),
'Constructor should propagate exceptions');
() => new File(['bits'], 'name.txt', {type: to_string_throws}),
'Constructor should propagate exceptions');
}, 'Property bag propagates exceptions');
</script>