mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +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
|
@ -117,10 +117,10 @@ directory_test(async (t, root) => {
|
|||
const handle = await createEmptyFile(t, 'bad_offset', root);
|
||||
const stream = await handle.createWritable();
|
||||
|
||||
await promise_rejects(
|
||||
await promise_rejects_dom(
|
||||
t, 'InvalidStateError', stream.write({type: 'write', position: 4, data: new Blob(['abc'])}));
|
||||
await promise_rejects(
|
||||
t, TypeError(), stream.close(), 'stream is already closed');
|
||||
await promise_rejects_js(
|
||||
t, TypeError, stream.close(), 'stream is already closed');
|
||||
|
||||
assert_equals(await getFileContents(handle), '');
|
||||
assert_equals(await getFileSize(handle), 0);
|
||||
|
@ -202,7 +202,7 @@ directory_test(async (t, root) => {
|
|||
await stream.write('foo');
|
||||
|
||||
await root.removeEntry('parent_dir', {recursive: true});
|
||||
await promise_rejects(t, 'NotFoundError', stream.close());
|
||||
await promise_rejects_dom(t, 'NotFoundError', stream.close());
|
||||
}, 'atomic writes: close() fails when parent directory is removed');
|
||||
|
||||
directory_test(async (t, root) => {
|
||||
|
@ -233,8 +233,8 @@ directory_test(async (t, root) => {
|
|||
assert_equals(await getFileContents(handle), 'foo');
|
||||
assert_equals(await getFileSize(handle), 3);
|
||||
|
||||
await promise_rejects(
|
||||
t, TypeError(), stream.write('abc'));
|
||||
await promise_rejects_js(
|
||||
t, TypeError, stream.write('abc'));
|
||||
}, 'atomic writes: write() after close() fails');
|
||||
|
||||
directory_test(async (t, root) => {
|
||||
|
@ -247,7 +247,7 @@ directory_test(async (t, root) => {
|
|||
assert_equals(await getFileContents(handle), 'foo');
|
||||
assert_equals(await getFileSize(handle), 3);
|
||||
|
||||
await promise_rejects(t, TypeError(), stream.truncate(0));
|
||||
await promise_rejects_js(t, TypeError, stream.truncate(0));
|
||||
}, 'atomic writes: truncate() after close() fails');
|
||||
|
||||
directory_test(async (t, root) => {
|
||||
|
@ -259,7 +259,7 @@ directory_test(async (t, root) => {
|
|||
assert_equals(await getFileContents(handle), 'foo');
|
||||
assert_equals(await getFileSize(handle), 3);
|
||||
|
||||
await promise_rejects(t, TypeError(), stream.close());
|
||||
await promise_rejects_js(t, TypeError, stream.close());
|
||||
}, 'atomic writes: close() after close() fails');
|
||||
|
||||
directory_test(async (t, root) => {
|
||||
|
@ -285,7 +285,7 @@ directory_test(async (t, root) => {
|
|||
await stream.write('bar');
|
||||
|
||||
await dir.removeEntry(file_name);
|
||||
await promise_rejects(t, 'NotFoundError', getFileContents(handle));
|
||||
await promise_rejects_dom(t, 'NotFoundError', getFileContents(handle));
|
||||
|
||||
await stream.close();
|
||||
assert_equals(await getFileContents(handle), 'bar');
|
||||
|
@ -312,8 +312,8 @@ directory_test(async (t, root) => {
|
|||
t, 'content.txt', 'very long string', root);
|
||||
const stream = await handle.createWritable();
|
||||
|
||||
await promise_rejects(
|
||||
t, SyntaxError(), stream.write({type: 'truncate'}), 'truncate without size');
|
||||
await promise_rejects_dom(
|
||||
t, "SyntaxError", stream.write({type: 'truncate'}), 'truncate without size');
|
||||
|
||||
}, 'WriteParams: truncate missing size param');
|
||||
|
||||
|
@ -321,8 +321,8 @@ directory_test(async (t, root) => {
|
|||
const handle = await createEmptyFile(t, 'content.txt', root);
|
||||
const stream = await handle.createWritable();
|
||||
|
||||
await promise_rejects(
|
||||
t, SyntaxError(), stream.write({type: 'write'}), 'write without data');
|
||||
await promise_rejects_dom(
|
||||
t, "SyntaxError", stream.write({type: 'write'}), 'write without data');
|
||||
|
||||
}, 'WriteParams: write missing data param');
|
||||
|
||||
|
@ -331,7 +331,7 @@ directory_test(async (t, root) => {
|
|||
t, 'content.txt', 'seekable', root);
|
||||
const stream = await handle.createWritable();
|
||||
|
||||
await promise_rejects(
|
||||
t, SyntaxError(), stream.write({type: 'seek'}), 'seek without position');
|
||||
await promise_rejects_dom(
|
||||
t, "SyntaxError", stream.write({type: 'seek'}), 'seek without position');
|
||||
|
||||
}, 'WriteParams: seek missing position param');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue