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-11 08:33:46 +00:00
Родитель b1be27281c
Коммит 72f77002b1
4 изменённых файлов: 9 добавлений и 9 удалений

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

@ -31,9 +31,9 @@
[createWritable after removeEntry succeeds but doesnt recreate the file]
expected:
if (os == "win") and debug and swgl: [FAIL, NOTRUN]
if (os == "win") and not debug: [FAIL, NOTRUN]
FAIL
if (os == "win") and debug and swgl: [PASS, NOTRUN]
if (os == "win") and not debug: [PASS, NOTRUN]
PASS
[removeEntry() with a path separator should fail.]
expected:
@ -100,9 +100,9 @@
[createWritable after removeEntry succeeds but doesnt recreate the file]
expected:
if (os == "win") and debug and swgl: [FAIL, NOTRUN]
if (os == "win") and not debug: [FAIL, NOTRUN]
FAIL
if (os == "win") and debug and swgl: [PASS, NOTRUN]
if (os == "win") and not debug: [PASS, NOTRUN]
PASS
[removeEntry() on a directory recursively should delete all sub-items]
expected:

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

@ -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'));