Skip to content

Commit

Permalink
Refactor native_file_system -> file_system_access in wpt
Browse files Browse the repository at this point in the history
Bug: 110509
Change-Id: I5c4c32e731e8aeecc9a2bfb5b60ee12ebb76f59a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2643042
Commit-Queue: Austin Sullivan <[email protected]>
Reviewed-by: Marijn Kruisselbrink <[email protected]>
Cr-Commit-Position: refs/heads/master@{#850164}
  • Loading branch information
a-sully authored and chromium-wpt-export-bot committed Feb 3, 2021
1 parent 2537e59 commit 489679e
Show file tree
Hide file tree
Showing 80 changed files with 65 additions and 65 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions file-system-access/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory contains tests for the
[File System Access](https://wicg.github.io/file-system-access/) specification.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -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});
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'] } },
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'] } },
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions native-file-system/README.md

This file was deleted.

0 comments on commit 489679e

Please sign in to comment.