mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
Update web-platform-tests to revision 55351d32dd26ea3ad42a8f5973e943ba0342c812
This commit is contained in:
parent
1b7223a284
commit
81d0cdbb2c
159 changed files with 2809 additions and 967 deletions
|
@ -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 => {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue