Skip to content

Commit

Permalink
[ios] Fix users cannot select folder in document picker
Browse files Browse the repository at this point in the history
Allow users to select folder in document picker when developers call `window.showDirectoryPicker()` from JavaScript side

Bug: 1411704
Change-Id: I63ae14a7f233a7083d91b4e5b77e1808ac620f19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5891832
Reviewed-by: Dave Tapuska <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Xiaobin Cui <[email protected]>
Reviewed-by: Julie Jeongeun Kim <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1361497}
  • Loading branch information
Xiaobin Cui authored and chromium-wpt-export-bot committed Sep 28, 2024
1 parent 04fb624 commit 1359c8c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/test-helpers.js"></script>
<script src="resources/local-fs-test-helpers.js"></script>
<script src="resources/messaging-helpers.js"></script>
<script src="../fs/resources/messaging-helpers.js"></script>
<script src="../fs/script-tests/FileSystemFileHandle-create-sync-access-handle.js"></script>
23 changes: 23 additions & 0 deletions file-system-access/resources/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,26 @@ async function createFileWithContents(name, contents, parent) {
await writer.close();
return handle;
}

async function cleanup(test, value, cleanup_func) {
test.add_cleanup(async () => {
try {
await cleanup_func();
} catch (e) {
// Ignore any errors when removing files, as tests might already remove
// the file.
}
});
return value;
}

async function cleanup_writable(test, value) {
return cleanup(test, value, async () => {
try {
await value.close();
} catch (e) {
// Ignore any errors when closing writables, since attempting to close
// aborted or closed writables will error.
}
});
}

0 comments on commit 1359c8c

Please sign in to comment.