зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
65633f106f
Коммит
9d7785625f
|
@ -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'));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче