diff --git a/file-system-access/script-tests/FileSystemBaseHandle-remove.js b/file-system-access/script-tests/FileSystemBaseHandle-remove.js index 329fbe223f3ad2..2306bde7cdb87b 100644 --- a/file-system-access/script-tests/FileSystemBaseHandle-remove.js +++ b/file-system-access/script-tests/FileSystemBaseHandle-remove.js @@ -80,7 +80,7 @@ directory_test(async (t, root) => { await createFileWithContents(t, 'file-to-keep', 'abc', root); const writable = await handle.createWritable(); - await promise_rejects_dom(t, 'AbortError', handle.remove()); + await promise_rejects_dom(t, 'NoModificationAllowedError', handle.remove()); await writable.close(); assert_array_equals( diff --git a/file-system-access/script-tests/FileSystemFileHandle-move.js b/file-system-access/script-tests/FileSystemFileHandle-move.js index 7e62872adab896..31fa55c0e1a9c4 100644 --- a/file-system-access/script-tests/FileSystemFileHandle-move.js +++ b/file-system-access/script-tests/FileSystemFileHandle-move.js @@ -162,7 +162,7 @@ directory_test(async (t, root) => { // Cannot move handle with an active writable. const stream = await file.createWritable(); - await promise_rejects_dom(t, 'InvalidStateError', file.move(dir_dest)); + await promise_rejects_dom(t, 'NoModificationAllowedError', file.move(dir_dest)); assert_array_equals( await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); @@ -185,7 +185,7 @@ directory_test(async (t, root) => { // Cannot move handle with an active writable. const stream = await file.createWritable(); - await promise_rejects_dom(t, 'InvalidStateError', file.move(dir_dest)); + await promise_rejects_dom(t, 'NoModificationAllowedError', file.move(dir_dest)); assert_array_equals( await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); @@ -210,7 +210,7 @@ directory_test(async (t, root) => { // Cannot overwrite handle with an active writable. const stream = await file_dest.createWritable(); - await promise_rejects_dom(t, 'InvalidStateError', file.move(dir_dest)); + await promise_rejects_dom(t, 'NoModificationAllowedError', file.move(dir_dest)); assert_array_equals( await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); @@ -238,7 +238,7 @@ directory_test(async (t, root) => { // Cannot overwrite handle with an active writable. const stream = await file_dest.createWritable(); await promise_rejects_dom( - t, 'InvalidStateError', file.move(dir_dest, 'file-dest')); + t, 'NoModificationAllowedError', file.move(dir_dest, 'file-dest')); assert_array_equals( await getSortedDirectoryEntries(root), ['dir-dest/', 'dir-src/']); diff --git a/file-system-access/script-tests/FileSystemFileHandle-rename.js b/file-system-access/script-tests/FileSystemFileHandle-rename.js index 425fcaea5501d3..94ca0207e43465 100644 --- a/file-system-access/script-tests/FileSystemFileHandle-rename.js +++ b/file-system-access/script-tests/FileSystemFileHandle-rename.js @@ -81,7 +81,7 @@ directory_test(async (t, root) => { // Cannot rename handle with an active writable. const stream = await handle.createWritable(); await promise_rejects_dom( - t, 'InvalidStateError', handle.rename('file-after')); + t, 'NoModificationAllowedError', handle.rename('file-after')); // Can move handle once the writable is closed. await stream.close(); @@ -97,7 +97,7 @@ directory_test(async (t, root) => { // Cannot overwrite a handle with an active writable. const stream = await handle_dest.createWritable(); await promise_rejects_dom( - t, 'InvalidStateError', handle.rename('file-after')); + t, 'NoModificationAllowedError', handle.rename('file-after')); // Can move handle once the writable is closed. await stream.close();