Bug 1689708 [wpt PR 27396] - Refactor native_file_system -> file_system_access in wpt, a=testonly
Automatic update from web-platform-tests Refactor native_file_system -> file_system_access in wpt Bug: 110509 Change-Id: I5c4c32e731e8aeecc9a2bfb5b60ee12ebb76f59a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643042 Commit-Queue: Austin Sullivan <asully@chromium.org> Reviewed-by: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#850164} -- wpt-commits: 489679e4fccedcb37ae4d3e028b5d1a56adbc769 wpt-pr: 27396
This commit is contained in:
committed by
moz-wptsync-bot
parent
5ea2f3447a
commit
0f921b51a9
2
testing/web-platform/tests/file-system-access/README.md
Normal file
2
testing/web-platform/tests/file-system-access/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
This directory contains tests for the
|
||||
[File System Access](https://wicg.github.io/file-system-access/) specification.
|
||||
@@ -5,7 +5,7 @@
|
||||
'use strict';
|
||||
|
||||
idl_test(
|
||||
['native-file-system'],
|
||||
['file-system-access'],
|
||||
['storage', 'permissions', 'streams', 'html', 'dom'],
|
||||
idl_array => {
|
||||
idl_array.add_objects({
|
||||
@@ -6,7 +6,7 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
<script src="/IndexedDB/support-promises.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemBaseHandle-isSameEntry.js"></script>
|
||||
@@ -8,7 +8,7 @@
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemBaseHandle-postMessage-BroadcastChannel.js"></script>
|
||||
@@ -9,7 +9,7 @@
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-blob-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
@@ -7,7 +7,7 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-blob-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
@@ -7,7 +7,7 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-blob-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
@@ -8,7 +8,7 @@
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-blob-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
@@ -7,7 +7,7 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-blob-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
@@ -7,7 +7,7 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-blob-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
@@ -8,7 +8,7 @@
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="resources/messaging-helpers.js"></script>
|
||||
<script src="resources/messaging-blob-helpers.js"></script>
|
||||
<script src="resources/messaging-serialize-helpers.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemDirectoryHandle-getDirectoryHandle.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemDirectoryHandle-getFileHandle.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemDirectoryHandle-iteration.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemDirectoryHandle-removeEntry.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemDirectoryHandle-resolve.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemFileHandle-getFile.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemWritableFileStream.js"></script>
|
||||
@@ -6,6 +6,6 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="../streams/resources/recording-streams.js"></script>
|
||||
<script src="script-tests/FileSystemWritableFileStream-piped.js"></script>
|
||||
@@ -6,5 +6,5 @@
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/test-helpers.js"></script>
|
||||
<script src="resources/native-fs-test-helpers.js"></script>
|
||||
<script src="resources/local-fs-test-helpers.js"></script>
|
||||
<script src="script-tests/FileSystemWritableFileStream-write.js"></script>
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
|
||||
// add_message_event_handlers() is the helper function used to setup all
|
||||
// message targets, including iframes and workers.
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following script:
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
// /service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
// Define the URL constants used for each type of message target, including
|
||||
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following script:
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
|
||||
// Serializes an array of FileSystemHandles where each element can be either a
|
||||
// FileSystemFileHandle or FileSystemDirectoryHandle.
|
||||
@@ -3,8 +3,8 @@
|
||||
// function in this file will return an empty directory in the sandboxed file
|
||||
// system.
|
||||
//
|
||||
// Another implementation of this function exists in native-fs-test-helpers.js,
|
||||
// where that version uses the native file system instead.
|
||||
// Another implementation of this function exists in local-fs-test-helpers.js,
|
||||
// where that version uses the local file system instead.
|
||||
|
||||
async function cleanupSandboxedFileSystem() {
|
||||
const dir = await navigator.storage.getDirectory();
|
||||
@@ -1,9 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
// /service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
// Sets up a new broadcast channel in |target|. Posts a message instructing
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-blob-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-blob-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
// /common/get-host-info.sub.js
|
||||
// /service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
@@ -198,8 +198,8 @@ directory_test(async (t, root_dir) => {
|
||||
await do_send_message_error_test(t, root_dir, /*receiver=*/self,
|
||||
/*target=*/iframe.contentWindow, /*target_origin=*/'*',
|
||||
/*expected_has_source*/true, /*expected_origin=*/location.origin);
|
||||
// Do not test receiving FileSystemHandles from the data URI iframe.
|
||||
// Data URI iframes are insecure and do not expose the NativeFileSystem APIs.
|
||||
// Do not test receiving FileSystemHandles from the data URI iframe. Data URI
|
||||
// iframes are insecure and do not expose the File System Access APIs.
|
||||
}, 'Fail to send messages to a data URI iframe.');
|
||||
|
||||
directory_test(async (t, root_dir) => {
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-blob-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-blob-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
|
||||
directory_test(
|
||||
async (t, root_dir) => {
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-blob-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-blob-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
|
||||
directory_test(
|
||||
async (t, root_dir) => {
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-blob-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-blob-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
// /service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
directory_test(
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-blob-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-blob-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
|
||||
directory_test(async (t, root_dir) => {
|
||||
const iframe = await add_iframe(t, {src: kDocumentMessageTarget});
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-blob-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-blob-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
|
||||
directory_test(async (t, root_dir) => {
|
||||
const child_window = await open_window(t, kDocumentMessageTarget);
|
||||
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
// This script depends on the following scripts:
|
||||
// /native-file-system/resources/messaging-helpers.js
|
||||
// /native-file-system/resources/messaging-blob-helpers.js
|
||||
// /native-file-system/resources/messaging-serialize-helpers.js
|
||||
// /native-file-system/resources/test-helpers.js
|
||||
// /file-system-access/resources/messaging-helpers.js
|
||||
// /file-system-access/resources/messaging-blob-helpers.js
|
||||
// /file-system-access/resources/messaging-serialize-helpers.js
|
||||
// /file-system-access/resources/test-helpers.js
|
||||
// /service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
directory_test(async (t, root_dir) => {
|
||||
@@ -18,7 +18,7 @@
|
||||
await new Promise(resolve => step_timeout(resolve, 100));
|
||||
|
||||
await window.test_driver.bless(
|
||||
'show a directory picker.<br />Please select native-file-system/resources/data/');
|
||||
'show a directory picker.<br />Please select file-system-access/resources/data/');
|
||||
const dir = await self.showDirectoryPicker();
|
||||
assert_true(dir instanceof FileSystemHandle);
|
||||
assert_true(dir instanceof FileSystemDirectoryHandle);
|
||||
@@ -18,7 +18,7 @@
|
||||
await new Promise(resolve => step_timeout(resolve, 100));
|
||||
|
||||
await window.test_driver.bless(
|
||||
'show a file picker.<br />Please select native-file-system/resources/data/testfile.txt');
|
||||
'show a file picker.<br />Please select file-system-access/resources/data/testfile.txt');
|
||||
const files = await self.showOpenFilePicker({
|
||||
multiple: false, types: [
|
||||
{ description: 'Text files', accept: { ' text/plain ': ['.txt'] } },
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
promise_test(async t => {
|
||||
await window.test_driver.bless(
|
||||
'show a file picker.<br />Please select native-file-system/resources/data/testfile.txt');
|
||||
'show a file picker.<br />Please select file-system-access/resources/data/testfile.txt');
|
||||
const files = await self.showOpenFilePicker({
|
||||
multiple: false,
|
||||
startIn: null,
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
promise_test(async t => {
|
||||
await window.test_driver.bless(
|
||||
'show a file picker.<br />Please make a copy of native-file-system/resources/data/testfile.txt in a writable directory and pick that file');
|
||||
'show a file picker.<br />Please make a copy of file-system-access/resources/data/testfile.txt in a writable directory and pick that file');
|
||||
const file = await self.showSaveFilePicker({
|
||||
multiple: false, types: [
|
||||
{ description: 'Text files', accept: { 'text/plain': ['.txt'] } },
|
||||
@@ -1,2 +0,0 @@
|
||||
This directory contains (tentative) tests for the
|
||||
[Native File System](https://wicg.github.io/native-file-system/) specification.
|
||||
Reference in New Issue
Block a user