Changeset 285912 in webkit


Ignore:
Timestamp:
Nov 16, 2021 6:55:32 PM (8 months ago)
Author:
sihui_liu@apple.com
Message:

Implement FileSystemFileHandle.getFile()
https://bugs.webkit.org/show_bug.cgi?id=232716
<rdar://problem/85022453>

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaselined existing tests as some tests are passed and the others can run further due to the new support.

  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt:

Source/WebCore:

Spec: https://wicg.github.io/file-system-access/#api-filesystemfilehandle-getfile

Tests: storage/filesystemaccess/file-handle-getfile-worker.html

storage/filesystemaccess/file-handle-getfile.html

  • Modules/filesystemaccess/FileSystemFileHandle.cpp:

(WebCore::FileSystemFileHandle::getFile):

  • Modules/filesystemaccess/FileSystemStorageConnection.h:
  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:

(WebCore::WorkerFileSystemStorageConnection::scopeClosed):
(WebCore::WorkerFileSystemStorageConnection::didResolve):
(WebCore::WorkerFileSystemStorageConnection::getFile):
(WebCore::WorkerFileSystemStorageConnection::completeStringCallback):

  • Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:

Source/WebKit:

Let web process send message to network process for file path.

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::getFile):

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/NetworkStorageManager.messages.in:
  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:

(WebKit::WebFileSystemStorageConnection::getFile):

  • WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h:

LayoutTests:

  • storage/filesystemaccess/file-handle-getfile-expected.txt: Added.
  • storage/filesystemaccess/file-handle-getfile-worker-expected.txt: Added.
  • storage/filesystemaccess/file-handle-getfile-worker.html: Added.
  • storage/filesystemaccess/file-handle-getfile.html: Added.
  • storage/filesystemaccess/resources/file-handle-getfile.js: Added.

(finishTest):
(async read):
(async test):

Location:
trunk
Files:
5 added
45 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r285896 r285912  
     12021-11-16  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Implement FileSystemFileHandle.getFile()
     4        https://bugs.webkit.org/show_bug.cgi?id=232716
     5        <rdar://problem/85022453>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        * storage/filesystemaccess/file-handle-getfile-expected.txt: Added.
     10        * storage/filesystemaccess/file-handle-getfile-worker-expected.txt: Added.
     11        * storage/filesystemaccess/file-handle-getfile-worker.html: Added.
     12        * storage/filesystemaccess/file-handle-getfile.html: Added.
     13        * storage/filesystemaccess/resources/file-handle-getfile.js: Added.
     14        (finishTest):
     15        (async read):
     16        (async test):
     17
    1182021-11-16  Nikita Vasilyev  <nvasilyev@apple.com>
    219
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r285885 r285912  
     12021-11-16  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Implement FileSystemFileHandle.getFile()
     4        https://bugs.webkit.org/show_bug.cgi?id=232716
     5        <rdar://problem/85022453>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        Rebaselined existing tests as some tests are passed and the others can run further due to the new support.
     10
     11        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt:
     12        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt:
     13        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt:
     14        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt:
     15        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt:
     16        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt:
     17        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt:
     18        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt:
     19        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt:
     20        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt:
     21        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt:
     22        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt:
     23        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt:
     24        * web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt:
     25        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt:
     26        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt:
     27        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt:
     28        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt:
     29        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt:
     30        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt:
     31        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt:
     32        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:
     33        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt:
     34        * web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt:
     35        * web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt:
     36        * web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt:
     37        * web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt:
     38        * web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt:
     39        * web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt:
     40        * web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt:
     41        * web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt:
     42        * web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt:
     43
    1442021-11-16  Rob Buis  <rbuis@igalia.com>
    245
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    77
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    77
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt

    r283881 r285912  
    33PASS isSameEntry for different directories returns false
    44PASS isSameEntry for different handles for the same directory
    5 FAIL isSameEntry for identical file handles returns true promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL isSameEntry for different files returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL isSameEntry for different handles for the same file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL isSameEntry comparing a file to a file in a different directory returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL isSameEntry comparing a file to a directory returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     5PASS isSameEntry for identical file handles returns true
     6PASS isSameEntry for different files returns false
     7PASS isSameEntry for different handles for the same file
     8PASS isSameEntry comparing a file to a file in a different directory returns false
     9PASS isSameEntry comparing a file to a directory returns false
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt

    r283881 r285912  
    33PASS isSameEntry for different directories returns false
    44PASS isSameEntry for different handles for the same directory
    5 FAIL isSameEntry for identical file handles returns true promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL isSameEntry for different files returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL isSameEntry for different handles for the same file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL isSameEntry comparing a file to a file in a different directory returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL isSameEntry comparing a file to a directory returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     5PASS isSameEntry for identical file handles returns true
     6PASS isSameEntry for different files returns false
     7PASS isSameEntry for different handles for the same file
     8PASS isSameEntry comparing a file to a file in a different directory returns false
     9PASS isSameEntry comparing a file to a directory returns false
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt

    r285534 r285912  
    11
    2 FAIL Send and receive messages using a broadcast channel in an iframe, dedicated worker and service worker. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Send and receive messages using a broadcast channel in an iframe, dedicated worker and service worker. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    33
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt

    r283881 r285912  
    11
    2 FAIL Fail to send and receive messages using a cross origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Fail to send and receive messages using a cross origin message port in an iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Fail to send to a sandboxed iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL Fail to send messages using a message port to a sandboxed iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL Fail to send messages to a data URI iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL Fail to send messages using a message port in a data URI iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL Fail to send and receive messages using a cross origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL Fail to send and receive messages using a cross origin message port in a window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    10 FAIL Fail to send messages to  a sandboxed window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    11 FAIL Fail to send messages using a message port to a sandboxed window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Fail to send and receive messages using a cross origin iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Fail to send and receive messages using a cross origin message port in an iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL Fail to send to a sandboxed iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL Fail to send messages using a message port to a sandboxed iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL Fail to send messages to a data URI iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL Fail to send messages using a message port in a data URI iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL Fail to send and receive messages using a cross origin window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     9FAIL Fail to send and receive messages using a cross origin message port in a window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     10FAIL Fail to send messages to  a sandboxed window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     11FAIL Fail to send messages using a message port to a sandboxed window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt

    r283881 r285912  
    11
    2 FAIL Send and receive messages using a message port in a same origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Send and receive messages using a message port in a sandboxed same origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Send and receive messages using a message port in a blob iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL Send and receive messages using a message port in an iframe srcdoc. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Send and receive messages using a message port in a same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Send and receive messages using a message port in a sandboxed same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL Send and receive messages using a message port in a blob iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL Send and receive messages using a message port in an iframe srcdoc. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt

    r283881 r285912  
    11
    2 FAIL Send and receive messages using a message port in a same origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Send and receive messages using a message port in a blob window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Send and receive messages using a message port in a sandboxed same origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Send and receive messages using a message port in a same origin window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Send and receive messages using a message port in a blob window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL Send and receive messages using a message port in a sandboxed same origin window. promise_test: Unhandled rejection with value: object "SyntaxError: The string did not match the expected pattern."
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt

    r283881 r285912  
    11
    2 FAIL Send and receive messages using a message port in a dedicated worker. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Send and receive messages using a message port in a service worker. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Send and receive messages using a message port in a dedicated worker. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Send and receive messages using a message port in a service worker. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    44FAIL Send and receive messages using a message port in a shared  worker. promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'shared_worker.port.start')"
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt

    r283881 r285912  
    11
    2 FAIL Send and receive messages using a same origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Send and receive messages using a sandboxed same origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Send and receive messages using a blob iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL Send and receive messages using an iframe srcdoc. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Send and receive messages using a same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Send and receive messages using a sandboxed same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL Send and receive messages using a blob iframe. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL Send and receive messages using an iframe srcdoc. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt

    r283881 r285912  
    11
    2 FAIL Send and receive messages using a same origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Send and receive messages using a blob window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Send and receive messages using a sandboxed same origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Send and receive messages using a same origin window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Send and receive messages using a blob window. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL Send and receive messages using a sandboxed same origin window. promise_test: Unhandled rejection with value: object "SyntaxError: The string did not match the expected pattern."
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt

    r283881 r285912  
    11
    2 FAIL Send and receive messages using a dedicated worker. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL Send and receive messages using a service worker. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL Send and receive messages using a dedicated worker. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL Send and receive messages using a service worker. promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    44FAIL Send and receive messages using a shared worker. promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'shared_worker.port.start')"
    55
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    55FAIL remove() on an already removed directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.remove is not a function. (In 'dir.remove()', 'dir.remove' is undefined)"
    6 FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     6FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.remove is not a function. (In 'dir.remove()', 'dir.remove' is undefined)"
     7FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    99
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    55FAIL remove() on an already removed directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.remove is not a function. (In 'dir.remove()', 'dir.remove' is undefined)"
    6 FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     6FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.remove is not a function. (In 'dir.remove()', 'dir.remove' is undefined)"
     7FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    99
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt

    r283881 r285912  
    22PASS getDirectoryHandle(create=false) rejects for non-existing directories
    33FAIL getDirectoryHandle(create=true) creates an empty directory promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...entry of handle...')"
    4 FAIL getDirectoryHandle(create=false) returns existing directories promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     4PASS getDirectoryHandle(create=false) returns existing directories
    55PASS getDirectoryHandle(create=true) returns existing directories without erasing
    6 FAIL getDirectoryHandle() when a file already exists with the same name promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     6FAIL getDirectoryHandle() when a file already exists with the same name promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException TypeMismatchError: property "code" is equal to undefined, expected 17
    77FAIL getDirectoryHandle() with empty name assert_unreached: Should have rejected: undefined Reached unreachable code
    88FAIL getDirectoryHandle() with "." name promise_rejects_js: function "function () { throw e }" threw object "UnknownError: Name is invalid" ("UnknownError") expected instance of function "function TypeError() {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt

    r283881 r285912  
    22PASS getDirectoryHandle(create=false) rejects for non-existing directories
    33FAIL getDirectoryHandle(create=true) creates an empty directory promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...entry of handle...')"
    4 FAIL getDirectoryHandle(create=false) returns existing directories promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     4PASS getDirectoryHandle(create=false) returns existing directories
    55PASS getDirectoryHandle(create=true) returns existing directories without erasing
    6 FAIL getDirectoryHandle() when a file already exists with the same name promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     6FAIL getDirectoryHandle() when a file already exists with the same name promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException TypeMismatchError: property "code" is equal to undefined, expected 17
    77FAIL getDirectoryHandle() with empty name assert_unreached: Should have rejected: undefined Reached unreachable code
    88FAIL getDirectoryHandle() with "." name promise_rejects_js: function "function () { throw e }" threw object "UnknownError: Name is invalid" ("UnknownError") expected instance of function "function TypeError() {
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt

    r283881 r285912  
    11
    22PASS getFileHandle(create=false) rejects for non-existing files
    3 FAIL getFileHandle(create=true) creates an empty file for non-existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     3PASS getFileHandle(create=true) creates an empty file for non-existing files
     4FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    66FAIL getFileHandle(create=false) when a directory already exists with the same name promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException TypeMismatchError: property "code" is equal to undefined, expected 17
    77FAIL getFileHandle(create=true) when a directory already exists with the same name promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException TypeMismatchError: property "code" is equal to undefined, expected 17
     
    1313    [native code]
    1414}" ("TypeError")
    15 FAIL getFileHandle(create=false) with a path separator when the file exists. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     15FAIL getFileHandle(create=false) with a path separator when the file exists. promise_rejects_js: getFileHandle() must reject names containing "/" function "function () { throw e }" threw object "UnknownError: Name is invalid" ("UnknownError") expected instance of function "function TypeError() {
     16    [native code]
     17}" ("TypeError")
    1618FAIL getFileHandle(create=true) with a path separator promise_rejects_js: getFileHandle(create=true) must reject names containing "/" function "function () { throw e }" threw object "UnknownError: Name is invalid" ("UnknownError") expected instance of function "function TypeError() {
    1719    [native code]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt

    r283881 r285912  
    11
    22PASS getFileHandle(create=false) rejects for non-existing files
    3 FAIL getFileHandle(create=true) creates an empty file for non-existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     3PASS getFileHandle(create=true) creates an empty file for non-existing files
     4FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    66FAIL getFileHandle(create=false) when a directory already exists with the same name promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException TypeMismatchError: property "code" is equal to undefined, expected 17
    77FAIL getFileHandle(create=true) when a directory already exists with the same name promise_rejects_dom: function "function () { throw e }" threw object "TypeError: Type error" that is not a DOMException TypeMismatchError: property "code" is equal to undefined, expected 17
     
    1313    [native code]
    1414}" ("TypeError")
    15 FAIL getFileHandle(create=false) with a path separator when the file exists. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     15FAIL getFileHandle(create=false) with a path separator when the file exists. promise_rejects_js: getFileHandle() must reject names containing "/" function "function () { throw e }" threw object "UnknownError: Name is invalid" ("UnknownError") expected instance of function "function TypeError() {
     16    [native code]
     17}" ("TypeError")
    1618FAIL getFileHandle(create=true) with a path separator promise_rejects_js: getFileHandle(create=true) must reject names containing "/" function "function () { throw e }" threw object "UnknownError: Name is invalid" ("UnknownError") expected instance of function "function TypeError() {
    1719    [native code]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL values: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL values: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    88
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL values: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL values: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    88
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL removeEntry() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL removeEntry() on a non-empty directory should fail promise_rejects_dom: function "function () { throw e }" threw object "UnknownError: The operation failed for an unknown transient reason (e.g. out of memory)." that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
     6FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    77FAIL removeEntry() with empty name should fail assert_unreached: Should have rejected: undefined Reached unreachable code
    88FAIL removeEntry() with "." name should fail promise_rejects_js: function "function () { throw e }" threw object "UnknownError: The operation failed for an unknown transient reason (e.g. out of memory)." ("UnknownError") expected instance of function "function TypeError() {
     
    1212    [native code]
    1313}" ("TypeError")
    14 FAIL removeEntry() with a path separator should fail. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     14FAIL removeEntry() with a path separator should fail. assert_unreached: Should have rejected: removeEntry() must reject names containing "/" Reached unreachable code
    1515
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL removeEntry() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL removeEntry() on a non-empty directory should fail promise_rejects_dom: function "function () { throw e }" threw object "UnknownError: The operation failed for an unknown transient reason (e.g. out of memory)." that is not a DOMException InvalidModificationError: property "code" is equal to 0, expected 13
     6FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    77FAIL removeEntry() with empty name should fail assert_unreached: Should have rejected: undefined Reached unreachable code
    88FAIL removeEntry() with "." name should fail promise_rejects_js: function "function () { throw e }" threw object "UnknownError: The operation failed for an unknown transient reason (e.g. out of memory)." ("UnknownError") expected instance of function "function TypeError() {
     
    1212    [native code]
    1313}" ("TypeError")
    14 FAIL removeEntry() with a path separator should fail. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     14FAIL removeEntry() with a path separator should fail. assert_unreached: Should have rejected: removeEntry() must reject names containing "/" Reached unreachable code
    1515
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt

    r283881 r285912  
    11
    22PASS Resolve returns empty array for same directory
    3 FAIL Resolve returns correct path promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Resolve returns correct path with non-ascii characters promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL Resolve returns null when entry is not a child promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     3PASS Resolve returns correct path
     4PASS Resolve returns correct path with non-ascii characters
     5FAIL Resolve returns null when entry is not a child assert_equals: expected null but got []
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt

    r283881 r285912  
    11
    22PASS Resolve returns empty array for same directory
    3 FAIL Resolve returns correct path promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL Resolve returns correct path with non-ascii characters promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL Resolve returns null when entry is not a child promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     3PASS Resolve returns correct path
     4PASS Resolve returns correct path with non-ascii characters
     5FAIL Resolve returns null when entry is not a child assert_equals: expected null but got []
    66
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable({keepExistingData: false})', 'handle.createWritable' is undefined)"
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable({keepExistingData: false})', 'handle.createWritable' is undefined)"
    44
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL plays well with fetch promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL abort() aborts write promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL plays well with fetch promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     9FAIL abort() aborts write promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL plays well with fetch promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL abort() aborts write promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL plays well with fetch promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     9FAIL abort() aborts write promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    1010
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    10 FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    11 FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    12 FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    13 FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    14 FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    15 FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    16 FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    17 FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    18 FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    19 FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    20 FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    21 FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    22 FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    23 FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    24 FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    25 FAIL atomic writes: writable file stream persists file on close, even if file is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    26 FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    27 FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    28 FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    29 FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    30 FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     9FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     10FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     11FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     12FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     13FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     14FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     15FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     16FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     17FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     18FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     19FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     20FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     21FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     22FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     23FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     24FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     25FAIL atomic writes: writable file stream persists file on close, even if file is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     26FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     27FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     28FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     29FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     30FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    3131
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    10 FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    11 FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    12 FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    13 FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    14 FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    15 FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    16 FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    17 FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    18 FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    19 FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    20 FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    21 FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    22 FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    23 FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    24 FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    25 FAIL atomic writes: writable file stream persists file on close, even if file is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    26 FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    27 FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    28 FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    29 FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    30 FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     9FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     10FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     11FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     12FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     13FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     14FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     15FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     16FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     17FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     18FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     19FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     20FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     21FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     22FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     23FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     24FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     25FAIL atomic writes: writable file stream persists file on close, even if file is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     26FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     27FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     28FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     29FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     30FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    3131
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt

    r283881 r285912  
    11
    2 FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    10 FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    11 FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     9FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     10FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     11FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    1212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt

    r283881 r285912  
    11
    2 FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    3 FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    4 FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    5 FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    6 FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    7 FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    8 FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    9 FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    10 FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
    11 FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented"
     2FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     3FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     4FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     5FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     6FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     7FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     8FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     9FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     10FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
     11FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "TypeError: handle.createWritable is not a function. (In 'handle.createWritable()', 'handle.createWritable' is undefined)"
    1212
  • trunk/Source/WebCore/ChangeLog

    r285904 r285912  
     12021-11-16  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Implement FileSystemFileHandle.getFile()
     4        https://bugs.webkit.org/show_bug.cgi?id=232716
     5        <rdar://problem/85022453>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        Spec: https://wicg.github.io/file-system-access/#api-filesystemfilehandle-getfile
     10
     11        Tests: storage/filesystemaccess/file-handle-getfile-worker.html
     12               storage/filesystemaccess/file-handle-getfile.html
     13
     14        * Modules/filesystemaccess/FileSystemFileHandle.cpp:
     15        (WebCore::FileSystemFileHandle::getFile):
     16        * Modules/filesystemaccess/FileSystemStorageConnection.h:
     17        * Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:
     18        (WebCore::WorkerFileSystemStorageConnection::scopeClosed):
     19        (WebCore::WorkerFileSystemStorageConnection::didResolve):
     20        (WebCore::WorkerFileSystemStorageConnection::getFile):
     21        (WebCore::WorkerFileSystemStorageConnection::completeStringCallback):
     22        * Modules/filesystemaccess/WorkerFileSystemStorageConnection.h:
     23
    1242021-11-16  Nikolaos Mouchtaris  <nmouchtaris@apple.com>
    225
  • trunk/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp

    r285566 r285912  
    4949void FileSystemFileHandle::getFile(DOMPromiseDeferred<IDLInterface<File>>&& promise)
    5050{
    51     promise.reject(Exception { NotSupportedError, "getFile is not implemented"_s });
     51    if (isClosed())
     52        return promise.reject(Exception { InvalidStateError, "Handle is closed" });
     53
     54    connection().getFile(identifier(), [protectedThis = Ref { *this }, promise = WTFMove(promise)](auto result) mutable {
     55        if (result.hasException())
     56            return promise.reject(result.releaseException());
     57
     58        auto* context = protectedThis->scriptExecutionContext();
     59        if (!context)
     60            return promise.reject(Exception { InvalidStateError, "Context has stopped"_s });
     61
     62        promise.resolve(File::create(context, result.returnValue(), { }, protectedThis->name()));
     63    });
    5264}
    5365
  • trunk/Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h

    r285566 r285912  
    4949    using GetHandleNamesCallback = CompletionHandler<void(ExceptionOr<Vector<String>>&&)>;
    5050    using GetHandleWithTypeCallback = CompletionHandler<void(ExceptionOr<std::pair<FileSystemHandleIdentifier, bool>>&&)>;
     51    using StringCallback = CompletionHandler<void(ExceptionOr<String>&&)>;
    5152
    5253    virtual void closeHandle(FileSystemHandleIdentifier) = 0;
     
    5758    virtual void removeEntry(FileSystemHandleIdentifier, const String& name, bool deleteRecursively, VoidCallback&&) = 0;
    5859    virtual void resolve(FileSystemHandleIdentifier, FileSystemHandleIdentifier, ResolveCallback&&) = 0;
     60    virtual void getFile(FileSystemHandleIdentifier, StringCallback&&) = 0;
    5961    virtual void createSyncAccessHandle(FileSystemHandleIdentifier, GetAccessHandleCallback&&) = 0;
    6062    virtual void close(FileSystemHandleIdentifier, FileSystemSyncAccessHandleIdentifier, VoidCallback&&) = 0;
  • trunk/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp

    r285566 r285912  
    7474        callback(Exception { InvalidStateError });
    7575
     76    auto stringCallbacks = std::exchange(m_stringCallbacks, { });
     77    for (auto& callback : stringCallbacks.values())
     78        callback(Exception { InvalidStateError });
     79
    7680    m_scope = nullptr;
    7781}
     
    200204{
    201205    if (auto callback = m_resolveCallbacks.take(callbackIdentifier))
     206        callback(WTFMove(result));
     207}
     208
     209void WorkerFileSystemStorageConnection::getFile(FileSystemHandleIdentifier identifier, StringCallback&& callback)
     210{
     211    if (!m_scope)
     212        return callback(Exception { InvalidStateError });
     213
     214    auto callbackIdentifier = CallbackIdentifier::generateThreadSafe();
     215    m_stringCallbacks.add(callbackIdentifier, WTFMove(callback));
     216
     217    callOnMainThread([callbackIdentifier, workerThread = Ref { m_scope->thread() }, mainThreadConnection = m_mainThreadConnection, identifier]() mutable {
     218        auto mainThreadCallback = [callbackIdentifier, workerThread = WTFMove(workerThread)](auto result) mutable {
     219            workerThread->runLoop().postTaskForMode([callbackIdentifier, result = crossThreadCopy(result)] (auto& scope) mutable {
     220                if (auto connection = downcast<WorkerGlobalScope>(scope).fileSystemStorageConnection())
     221                    connection->completeStringCallback(callbackIdentifier, WTFMove(result));
     222            }, WorkerRunLoop::defaultMode());
     223        };
     224
     225        mainThreadConnection->getFile(identifier, WTFMove(mainThreadCallback));
     226    });
     227}
     228
     229void WorkerFileSystemStorageConnection::completeStringCallback(CallbackIdentifier callbackIdentifier, ExceptionOr<String>&& result)
     230{
     231    if (auto callback = m_stringCallbacks.take(callbackIdentifier))
    202232        callback(WTFMove(result));
    203233}
  • trunk/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h

    r285566 r285912  
    4848    void didGetHandle(CallbackIdentifier, ExceptionOr<FileSystemHandleIdentifier>&&);
    4949    void didResolve(CallbackIdentifier, ExceptionOr<Vector<String>>&&);
     50    void completeStringCallback(CallbackIdentifier, ExceptionOr<String>&&);
    5051    void didCreateSyncAccessHandle(CallbackIdentifier, ExceptionOr<std::pair<FileSystemSyncAccessHandleIdentifier, FileSystem::PlatformFileHandle>>&&);
    5152    void completeVoidCallback(CallbackIdentifier, ExceptionOr<void>&& result);
     
    6667    void getHandleNames(FileSystemHandleIdentifier, GetHandleNamesCallback&&) final;
    6768    void getHandle(FileSystemHandleIdentifier, const String& name, GetHandleWithTypeCallback&&) final;
     69    void getFile(FileSystemHandleIdentifier, StringCallback&&) final;
    6870
    6971    void createSyncAccessHandle(FileSystemHandleIdentifier, FileSystemStorageConnection::GetAccessHandleCallback&&) final;
     
    7981    HashMap<CallbackIdentifier, FileSystemStorageConnection::GetHandleNamesCallback> m_getHandleNamesCallbacks;
    8082    HashMap<CallbackIdentifier, FileSystemStorageConnection::GetHandleWithTypeCallback> m_getHandleWithTypeCallbacks;
     83    HashMap<CallbackIdentifier, FileSystemStorageConnection::StringCallback> m_stringCallbacks;
    8184};
    8285
  • trunk/Source/WebKit/ChangeLog

    r285911 r285912  
     12021-11-16  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Implement FileSystemFileHandle.getFile()
     4        https://bugs.webkit.org/show_bug.cgi?id=232716
     5        <rdar://problem/85022453>
     6
     7        Reviewed by Youenn Fablet.
     8
     9        Let web process send message to network process for file path.
     10
     11        * NetworkProcess/storage/NetworkStorageManager.cpp:
     12        (WebKit::NetworkStorageManager::getFile):
     13        * NetworkProcess/storage/NetworkStorageManager.h:
     14        * NetworkProcess/storage/NetworkStorageManager.messages.in:
     15        * WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp:
     16        (WebKit::WebFileSystemStorageConnection::getFile):
     17        * WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h:
     18
    1192021-11-16  Per Arne Vollan  <pvollan@apple.com>
    220
  • trunk/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp

    r285566 r285912  
    246246}
    247247
     248void NetworkStorageManager::getFile(WebCore::FileSystemHandleIdentifier identifier, CompletionHandler<void(Expected<String, FileSystemStorageError>)>&& completionHandler)
     249{
     250    ASSERT(!RunLoop::isMain());
     251
     252    auto handle = m_fileSystemStorageHandleRegistry->getHandle(identifier);
     253    if (!handle)
     254        return completionHandler(makeUnexpected(FileSystemStorageError::Unknown));
     255
     256    completionHandler(handle->path());
     257}
     258
    248259void NetworkStorageManager::createSyncAccessHandle(WebCore::FileSystemHandleIdentifier identifier, CompletionHandler<void(Expected<AccessHandleInfo, FileSystemStorageError>)>&& completionHandler)
    249260{
  • trunk/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h

    r285566 r285912  
    7777    void removeEntry(WebCore::FileSystemHandleIdentifier, const String& name, bool deleteRecursively, CompletionHandler<void(std::optional<FileSystemStorageError>)>&&);
    7878    void resolve(WebCore::FileSystemHandleIdentifier, WebCore::FileSystemHandleIdentifier, CompletionHandler<void(Expected<Vector<String>, FileSystemStorageError>)>&&);
     79    void getFile(WebCore::FileSystemHandleIdentifier, CompletionHandler<void(Expected<String, FileSystemStorageError>)>&&);
    7980
    8081    using AccessHandleInfo = std::pair<WebCore::FileSystemSyncAccessHandleIdentifier, IPC::SharedFileHandle>;
  • trunk/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in

    r285566 r285912  
    3535    Resolve(WebCore::FileSystemHandleIdentifier identifier, WebCore::FileSystemHandleIdentifier targetIdentifier) -> (Expected<Vector<String>, WebKit::FileSystemStorageError> result) Async
    3636    Move(WebCore::FileSystemHandleIdentifier identifier, WebCore::FileSystemHandleIdentifier destinationIdentifier, String newName) -> (std::optional<WebKit::FileSystemStorageError> result) Async
     37    GetFile(WebCore::FileSystemHandleIdentifier identifier) -> (Expected<String, WebKit::FileSystemStorageError> result) Async
    3738
    3839    CreateSyncAccessHandle(WebCore::FileSystemHandleIdentifier identifier) -> (Expected<std::pair<WebCore::FileSystemSyncAccessHandleIdentifier, IPC::SharedFileHandle>, WebKit::FileSystemStorageError> result) Async
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp

    r285566 r285912  
    121121}
    122122
     123void WebFileSystemStorageConnection::getFile(WebCore::FileSystemHandleIdentifier identifier, StringCallback&& completionHandler)
     124{
     125    if (!m_connection)
     126        return completionHandler(WebCore::Exception { WebCore::UnknownError, "Connection is lost" });
     127
     128    m_connection->sendWithAsyncReply(Messages::NetworkStorageManager::GetFile(identifier), [completionHandler = WTFMove(completionHandler)](auto result) mutable {
     129        if (!result)
     130            return completionHandler(convertToException(result.error()));
     131
     132        completionHandler(WTFMove(result.value()));
     133    });
     134}
     135
    123136void WebFileSystemStorageConnection::createSyncAccessHandle(WebCore::FileSystemHandleIdentifier identifier, WebCore::FileSystemStorageConnection::GetAccessHandleCallback&& completionHandler)
    124137{
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h

    r285566 r285912  
    8282    void getHandleNames(WebCore::FileSystemHandleIdentifier, FileSystemStorageConnection::GetHandleNamesCallback&&) final;
    8383    void getHandle(WebCore::FileSystemHandleIdentifier, const String& name, FileSystemStorageConnection::GetHandleWithTypeCallback&&) final;
     84    void getFile(WebCore::FileSystemHandleIdentifier, StringCallback&&) final;
    8485
    8586    void createSyncAccessHandle(WebCore::FileSystemHandleIdentifier, WebCore::FileSystemStorageConnection::GetAccessHandleCallback&&) final;
Note: See TracChangeset for help on using the changeset viewer.