Bug 1808009 - Clean up writable file streams after every test. r=dom-storage-reviewers,jesup

Differential Revision: https://phabricator.services.mozilla.com/D165730
This commit is contained in:
Jari Jalkanen 2023-01-10 19:08:22 +00:00
Родитель 65633f106f
Коммит 9d7785625f
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -72,7 +72,7 @@ directory_test(async (t, root_dir) => {
const id_before = await handle.getUniqueId();
// Write to the file. The unique ID should not change.
const writable = await handle.createWritable();
const writable = await cleanup_writable(t, await handle.createWritable());
await writable.write("blah");
await writable.close();

Просмотреть файл

@ -79,7 +79,7 @@ directory_test(async (t, root) => {
await createFileWithContents(t, 'file-to-remove', '12345', root);
await createFileWithContents(t, 'file-to-keep', 'abc', root);
const writable = await handle.createWritable();
const writable = await cleanup_writable(t, await handle.createWritable());
await promise_rejects_dom(t, 'NoModificationAllowedError', handle.remove());
await writable.close();

Просмотреть файл

@ -179,7 +179,7 @@ directory_test(async (t, root) => {
await createFileWithContents(t, 'file-to-remove', '12345', root);
await createFileWithContents(t, 'file-to-keep', 'abc', root);
const writable = await handle.createWritable();
const writable = await cleanup_writable(t, await handle.createWritable());
await promise_rejects_dom(
t, 'NoModificationAllowedError', root.removeEntry('file-to-remove'));