Update web-platform-tests to revision fd5a851b2e6bd60ff49060f1b42197c976273728

This commit is contained in:
WPT Sync Bot 2020-07-30 08:21:10 +00:00
parent b1bd409047
commit 53a530d4c0
83 changed files with 484 additions and 155 deletions

View file

@ -337,3 +337,18 @@ directory_test(async (t, root) => {
t, "SyntaxError", stream.write({type: 'seek'}), 'seek without position');
}, 'WriteParams: seek missing position param');
directory_test(async (t, root) => {
const source_file =
await createFileWithContents(t, 'source_file', 'source data', root);
const source_blob = await source_file.getFile();
await root.removeEntry(source_file.name);
const handle = await createEmptyFile(t, 'invalid_blob_test', root);
const stream = await handle.createWritable();
await promise_rejects_dom(t, "NotFoundError", stream.write(source_blob));
await promise_rejects_js(t, TypeError, stream.close());
assert_equals(await getFileContents(handle), '');
assert_equals(await getFileSize(handle), 0);
}, 'write() with an invalid blob to an empty file should reject');