WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-231142-20211005123650.patch (text/plain), 220.07 KB, created by
Sihui Liu
on 2021-10-05 12:36:52 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2021-10-05 12:36:52 PDT
Size:
220.07 KB
patch
obsolete
>Subversion Revision: 283555 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 4f522bb30aae2a4e86f31e046b0df6467cdf324d..7b19c545d9a9bca0337ef763f9d878aabff03c66 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,24 @@ >+2021-10-05 Sihui Liu <sihui_liu@apple.com> >+ >+ Add support for iterating FileSystemDirectoryHandle >+ https://bugs.webkit.org/show_bug.cgi?id=231142 >+ <rdar://problem/83848092> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add and expose some helper functions for JSFileSystemDirectoryHandleIterator. >+ >+ * runtime/JSBoundFunction.h: >+ * runtime/JSGlobalObject.h: >+ * runtime/JSGlobalObjectInlines.h: >+ (JSC::JSGlobalObject::performPromiseThenFunction const): >+ * runtime/JSPromise.cpp: >+ (JSC::JSPromise::createNewPromiseCapability): >+ (JSC::JSPromise::convertCapabilityToDeferredData): >+ (JSC::JSPromise::createDeferredData): >+ (JSC::JSPromise::performPromiseThen): >+ * runtime/JSPromise.h: >+ > 2021-10-04 Saam Barati <sbarati@apple.com> > > Display return values in nicer way in the jsc REPL and add a prettyPrint function >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 343b27626c8c2ccba667500ba781fb2dc62a025c..2f2007b000298295a1e3a2efe051d200637aa0a4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,72 @@ >+2021-10-05 Sihui Liu <sihui_liu@apple.com> >+ >+ Add support for iterating FileSystemDirectoryHandle >+ https://bugs.webkit.org/show_bug.cgi?id=231142 >+ <rdar://problem/83848092> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Spec: https://wicg.github.io/file-system-access/#api-filesystemdirectoryhandle-asynciterable >+ >+ Since AsyncIterable is not supported in bindings code generator yet, introduce a new class >+ JSFileSystemDirectoryHandleIterator and implement keys(), values(), and entries() as custom methods of >+ JSFileSystemDirectoryHandle. JSFileSystemDirectoryHandleIterator inherits async-iterator-prototype. >+ Implementation of JSFileSystemDirectoryHandleIterator is based on asynchronous iterator prototype object spec: >+ https://heycam.github.io/webidl/#es-asynchronous-iterator-prototype-object. >+ >+ For FileSystemDirectoryHandleIterator, it retrieves the keys (names of children handles) on initialization. >+ On each step, it takes out a key and request to get corresponding handle from backend to make sure file exists. >+ If the request fails, for example because file is removed after iterator initialization, it repeats the steps >+ until a valid handle is received or keys becomes empty. >+ >+ Test: storage/filesystemaccess/directory-handle-iteration.html >+ >+ * CMakeLists.txt: >+ * Headers.cmake: >+ * Modules/filesystemaccess/FileSystemDirectoryHandle.cpp: >+ (WebCore::FileSystemDirectoryHandle::getHandleNames): >+ (WebCore::FileSystemDirectoryHandle::getHandle): >+ * Modules/filesystemaccess/FileSystemDirectoryHandle.h: >+ * Modules/filesystemaccess/FileSystemDirectoryHandle.idl: >+ * Modules/filesystemaccess/FileSystemDirectoryHandleIterator.cpp: Added. >+ (WebCore::FileSystemDirectoryHandleIterator::create): >+ (WebCore::FileSystemDirectoryHandleIterator::FileSystemDirectoryHandleIterator): >+ (WebCore::FileSystemDirectoryHandleIterator::next): >+ (WebCore::FileSystemDirectoryHandleIterator::advance): >+ * Modules/filesystemaccess/FileSystemDirectoryHandleIterator.h: Added. >+ * Modules/filesystemaccess/FileSystemFileHandle.cpp: >+ (WebCore::FileSystemFileHandle::getFile): >+ * Modules/filesystemaccess/FileSystemStorageConnection.h: >+ * Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp: >+ (WebCore::WorkerFileSystemStorageConnection::getHandleNames): >+ (WebCore::WorkerFileSystemStorageConnection::didGetHandleNames): >+ (WebCore::WorkerFileSystemStorageConnection::getHandle): >+ (WebCore::WorkerFileSystemStorageConnection::didGetHandleWithType): >+ * Modules/filesystemaccess/WorkerFileSystemStorageConnection.h: >+ * Sources.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * bindings/js/JSFileSystemDirectoryHandleCustom.cpp: Added. >+ (WebCore::JSFileSystemDirectoryHandle::entries): >+ (WebCore::JSFileSystemDirectoryHandle::keys): >+ (WebCore::JSFileSystemDirectoryHandle::values): >+ * bindings/js/JSFileSystemDirectoryHandleIterator.cpp: Added. >+ (WebCore::createIterator): >+ (WebCore::JSFileSystemDirectoryHandleIteratorPrototype::next): >+ (WebCore::JSFileSystemDirectoryHandleIteratorPrototype::finishCreation): >+ (WebCore::jsFileSystemDirectoryHandleIterator_onPromiseFulfilledBody): >+ (WebCore::JSC_DEFINE_HOST_FUNCTION): >+ (WebCore::jsFileSystemDirectoryHandleIterator_onPromiseRejectedBody): >+ (WebCore::JSFileSystemDirectoryHandleIterator::getNextIterationResult): >+ (WebCore::JSFileSystemDirectoryHandleIterator::runNextSteps): >+ (WebCore::jsFileSystemDirectoryHandleIterator_runNextStepsBody): >+ (WebCore::JSFileSystemDirectoryHandleIterator::next): >+ (WebCore::JSFileSystemDirectoryHandleIterator::destroy): >+ (WebCore::JSFileSystemDirectoryHandleIterator::subspaceForImpl): >+ * bindings/js/JSFileSystemDirectoryHandleIterator.h: Added. >+ * bindings/js/WebCoreJSClientData.h: >+ (WebCore::JSVMClientData::fileSystemDirectoryHandleIteratorSpace): >+ (WebCore::JSVMClientData::setFileSystemDirectoryHandleIteratorSpace): >+ > 2021-10-05 Simon Fraser <simon.fraser@apple.com> > > REGRESSION (r283335): Momentum scrolling is no longer locked to an axis >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index f85df3f0ae3b9f0c63aa7c913e826272fa5fa3e3..d86064ccad6bd8965254f56314bacce8f825b5d2 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,27 @@ >+2021-10-05 Sihui Liu <sihui_liu@apple.com> >+ >+ Add support for iterating FileSystemDirectoryHandle >+ https://bugs.webkit.org/show_bug.cgi?id=231142 >+ <rdar://problem/83848092> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/storage/FileSystemStorageHandle.cpp: >+ (WebKit::FileSystemStorageHandle::getHandleNames): >+ (WebKit::FileSystemStorageHandle::getHandle): >+ * NetworkProcess/storage/FileSystemStorageHandle.h: >+ * NetworkProcess/storage/NetworkStorageManager.cpp: >+ (WebKit::NetworkStorageManager::getHandleNames): >+ (WebKit::NetworkStorageManager::getHandle): >+ * NetworkProcess/storage/NetworkStorageManager.h: >+ * NetworkProcess/storage/NetworkStorageManager.messages.in: >+ * WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp: >+ (WebKit::WebFileSystemStorageConnection::getFileHandle): >+ (WebKit::WebFileSystemStorageConnection::getDirectoryHandle): >+ (WebKit::WebFileSystemStorageConnection::getHandleNames): >+ (WebKit::WebFileSystemStorageConnection::getHandle): >+ * WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h: >+ > 2021-10-04 Chris Dumez <cdumez@apple.com> > > Add SPI to launch a service service worker in a WKWebView and expose service worker to injected bundle >diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt >index f4ac68c9268ed2b21d4913eef445ab8b8ef7ca3d..6df09208fc4a411368f3393b65372a37a6a02093 100644 >--- a/Source/JavaScriptCore/CMakeLists.txt >+++ b/Source/JavaScriptCore/CMakeLists.txt >@@ -915,6 +915,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS > runtime/ArrayPrototype.h > runtime/ArrayStorage.h > runtime/ArrayStorageInlines.h >+ runtime/AsyncIteratorPrototype.h > runtime/AuxiliaryBarrier.h > runtime/AuxiliaryBarrierInlines.h > runtime/BasicBlockLocation.h >diff --git a/Source/JavaScriptCore/runtime/JSBoundFunction.h b/Source/JavaScriptCore/runtime/JSBoundFunction.h >index 4a90b022dd30f6406731b0f1da9296a277c5c687..2083f9d7fb05f442a0903ae255cb4b53abdebe21 100644 >--- a/Source/JavaScriptCore/runtime/JSBoundFunction.h >+++ b/Source/JavaScriptCore/runtime/JSBoundFunction.h >@@ -48,7 +48,7 @@ public: > return vm.boundFunctionSpace<mode>(); > } > >- static JSBoundFunction* create(VM&, JSGlobalObject*, JSObject* targetFunction, JSValue boundThis, JSImmutableButterfly* boundArgs, double length, JSString* nameMayBeNull); >+ JS_EXPORT_PRIVATE static JSBoundFunction* create(VM&, JSGlobalObject*, JSObject* targetFunction, JSValue boundThis, JSImmutableButterfly* boundArgs, double length, JSString* nameMayBeNull); > > static bool customHasInstance(JSObject*, JSGlobalObject*, JSValue); > >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h >index 128b39910dd8057f7aabb59777ca680e9df61892..62005055136595590d4ff4f9507aa04514b655d9 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObject.h >+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h >@@ -693,6 +693,7 @@ public: > JSFunction* resolvePromiseFunction() const; > JSFunction* rejectPromiseFunction() const; > JSFunction* promiseProtoThenFunction() const; >+ JSFunction* performPromiseThenFunction() const; > JSFunction* objectProtoValueOfFunction() const { return m_objectProtoValueOfFunction.get(); } > JSFunction* numberProtoToStringFunction() const { return m_numberProtoToStringFunction.getInitializedOnMainThread(this); } > JSFunction* functionProtoHasInstanceSymbolFunction() const { return m_functionProtoHasInstanceSymbolFunction.get(); } >diff --git a/Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h b/Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h >index 3c5990ef3f081072529fc0d760dd86cd21ee1657..c17d065545fc04ac7fe14e9b4b4e6953eb54c765 100644 >--- a/Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h >+++ b/Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h >@@ -117,6 +117,7 @@ inline JSFunction* JSGlobalObject::newPromiseCapabilityFunction() const { return > inline JSFunction* JSGlobalObject::resolvePromiseFunction() const { return jsCast<JSFunction*>(linkTimeConstant(LinkTimeConstant::resolvePromise)); } > inline JSFunction* JSGlobalObject::rejectPromiseFunction() const { return jsCast<JSFunction*>(linkTimeConstant(LinkTimeConstant::rejectPromise)); } > inline JSFunction* JSGlobalObject::promiseProtoThenFunction() const { return jsCast<JSFunction*>(linkTimeConstant(LinkTimeConstant::defaultPromiseThen)); } >+inline JSFunction* JSGlobalObject::performPromiseThenFunction() const { return jsCast<JSFunction*>(linkTimeConstant(LinkTimeConstant::performPromiseThen)); } > inline JSFunction* JSGlobalObject::regExpProtoExecFunction() const { return jsCast<JSFunction*>(linkTimeConstant(LinkTimeConstant::regExpBuiltinExec)); } > inline GetterSetter* JSGlobalObject::regExpProtoGlobalGetter() const { return bitwise_cast<GetterSetter*>(linkTimeConstant(LinkTimeConstant::regExpProtoGlobalGetter)); } > inline GetterSetter* JSGlobalObject::regExpProtoUnicodeGetter() const { return bitwise_cast<GetterSetter*>(linkTimeConstant(LinkTimeConstant::regExpProtoUnicodeGetter)); } >diff --git a/Source/JavaScriptCore/runtime/JSPromise.cpp b/Source/JavaScriptCore/runtime/JSPromise.cpp >index 61ccdcdf11fbaaa09855e6d22b400231906b01a1..1c3fc1debbdbfa8cf61c021919e6657bf69b2e13 100644 >--- a/Source/JavaScriptCore/runtime/JSPromise.cpp >+++ b/Source/JavaScriptCore/runtime/JSPromise.cpp >@@ -103,7 +103,7 @@ bool JSPromise::isHandled(VM&) const > return flags() & isHandledFlag; > } > >-JSPromise::DeferredData JSPromise::createDeferredData(JSGlobalObject* globalObject, JSPromiseConstructor* promiseConstructor) >+JSValue JSPromise::createNewPromiseCapability(JSGlobalObject* globalObject, JSPromiseConstructor* promiseConstructor) > { > VM& vm = globalObject->vm(); > auto scope = DECLARE_THROW_SCOPE(vm); >@@ -118,17 +118,30 @@ JSPromise::DeferredData JSPromise::createDeferredData(JSGlobalObject* globalObje > JSValue deferred = call(globalObject, newPromiseCapabilityFunction, callData, jsUndefined(), arguments); > RETURN_IF_EXCEPTION(scope, { }); > >+ return deferred; >+} >+ >+JSPromise::DeferredData JSPromise::convertCapabilityToDeferredData(JSGlobalObject* globalObject, JSValue promiseCapability) >+{ > DeferredData result; >- result.promise = deferred.getAs<JSPromise*>(globalObject, vm.propertyNames->builtinNames().promisePrivateName()); >+ VM& vm = globalObject->vm(); >+ auto scope = DECLARE_THROW_SCOPE(vm); >+ >+ result.promise = promiseCapability.getAs<JSPromise*>(globalObject, vm.propertyNames->builtinNames().promisePrivateName()); > RETURN_IF_EXCEPTION(scope, { }); >- result.resolve = deferred.getAs<JSFunction*>(globalObject, vm.propertyNames->builtinNames().resolvePrivateName()); >+ result.resolve = promiseCapability.getAs<JSFunction*>(globalObject, vm.propertyNames->builtinNames().resolvePrivateName()); > RETURN_IF_EXCEPTION(scope, { }); >- result.reject = deferred.getAs<JSFunction*>(globalObject, vm.propertyNames->builtinNames().rejectPrivateName()); >+ result.reject = promiseCapability.getAs<JSFunction*>(globalObject, vm.propertyNames->builtinNames().rejectPrivateName()); > RETURN_IF_EXCEPTION(scope, { }); > > return result; > } > >+JSPromise::DeferredData JSPromise::createDeferredData(JSGlobalObject* globalObject, JSPromiseConstructor* promiseConstructor) >+{ >+ return convertCapabilityToDeferredData(globalObject, createNewPromiseCapability(globalObject, promiseConstructor)); >+} >+ > JSPromise* JSPromise::resolvedPromise(JSGlobalObject* globalObject, JSValue value) > { > VM& vm = globalObject->vm(); >@@ -238,4 +251,19 @@ JSPromise* JSPromise::rejectWithCaughtException(JSGlobalObject* globalObject, Th > return this; > } > >+void JSPromise::performPromiseThen(JSGlobalObject* globalObject, JSFunction* onFulFilled, JSFunction* onRejected, JSValue resultCapability) >+{ >+ JSFunction* performPromiseThenFunction = globalObject->performPromiseThenFunction(); >+ auto callData = JSC::getCallData(globalObject->vm(), performPromiseThenFunction); >+ ASSERT(callData.type != CallData::Type::None); >+ >+ MarkedArgumentBuffer arguments; >+ arguments.append(this); >+ arguments.append(onFulFilled); >+ arguments.append(onRejected); >+ arguments.append(resultCapability); >+ ASSERT(!arguments.hasOverflowed()); >+ call(globalObject, performPromiseThenFunction, callData, jsUndefined(), arguments); >+} >+ > } // namespace JSC >diff --git a/Source/JavaScriptCore/runtime/JSPromise.h b/Source/JavaScriptCore/runtime/JSPromise.h >index e4e5df271f362d7fb359f5d98907ef0808c72404..68dff87310debfd87ea4a7621535487be7bb108a 100644 >--- a/Source/JavaScriptCore/runtime/JSPromise.h >+++ b/Source/JavaScriptCore/runtime/JSPromise.h >@@ -84,6 +84,7 @@ public: > JS_EXPORT_PRIVATE void rejectAsHandled(JSGlobalObject*, JSValue); > JS_EXPORT_PRIVATE void reject(JSGlobalObject*, Exception*); > JS_EXPORT_PRIVATE void rejectAsHandled(JSGlobalObject*, Exception*); >+ JS_EXPORT_PRIVATE void performPromiseThen(JSGlobalObject*, JSFunction*, JSFunction*, JSValue); > > JS_EXPORT_PRIVATE JSPromise* rejectWithCaughtException(JSGlobalObject*, ThrowScope&); > >@@ -95,6 +96,8 @@ public: > JSFunction* reject { nullptr }; > }; > static DeferredData createDeferredData(JSGlobalObject*, JSPromiseConstructor*); >+ JS_EXPORT_PRIVATE static JSValue createNewPromiseCapability(JSGlobalObject*, JSPromiseConstructor*); >+ JS_EXPORT_PRIVATE static DeferredData convertCapabilityToDeferredData(JSGlobalObject*, JSValue); > > DECLARE_VISIT_CHILDREN; > >diff --git a/Source/WebCore/Headers.cmake b/Source/WebCore/Headers.cmake >index 394cb3bb6e1a32724951b22657ed9599fd378f82..7ef36b18b6c2cc241860a7fe35bd742a9d0c5ead 100644 >--- a/Source/WebCore/Headers.cmake >+++ b/Source/WebCore/Headers.cmake >@@ -38,6 +38,7 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS > Modules/fetch/FetchLoaderClient.h > > Modules/filesystemaccess/FileSystemDirectoryHandle.h >+ Modules/filesystemaccess/FileSystemDirectoryHandleIterator.h > Modules/filesystemaccess/FileSystemFileHandle.h > Modules/filesystemaccess/FileSystemHandle.h > Modules/filesystemaccess/FileSystemHandleIdentifier.h >diff --git a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp >index efe2a774edd0059fc4e193eb280145593b736813..c140a5d614db184c02ee92f689484132b8b80383 100644 >--- a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp >+++ b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "FileSystemDirectoryHandle.h" > >+#include "FileSystemDirectoryHandleIterator.h" > #include "FileSystemStorageConnection.h" > #include "JSDOMPromiseDeferred.h" > #include "JSFileSystemDirectoryHandle.h" >@@ -86,6 +87,28 @@ void FileSystemDirectoryHandle::resolve(const FileSystemHandle& handle, DOMPromi > }); > } > >+void FileSystemDirectoryHandle::getHandleNames(CompletionHandler<void(ExceptionOr<Vector<String>>&&)>&& completionHandler) >+{ >+ connection().getHandleNames(identifier(), WTFMove(completionHandler)); >+} >+ >+void FileSystemDirectoryHandle::getHandle(const String& name, CompletionHandler<void(ExceptionOr<Ref<FileSystemHandle>>&&)>&& completionHandler) >+{ >+ connection().getHandle(identifier(), name, [name, connection = Ref { connection() }, completionHandler = WTFMove(completionHandler)](auto result) mutable { >+ if (result.hasException()) >+ return completionHandler(result.releaseException()); >+ >+ auto [identifier, isDirectory] = result.releaseReturnValue(); >+ if (isDirectory) { >+ Ref<FileSystemHandle> handle = FileSystemDirectoryHandle::create(String { name }, identifier, WTFMove(connection)); >+ return completionHandler(WTFMove(handle)); >+ } >+ >+ Ref<FileSystemHandle> handle = FileSystemFileHandle::create(String { name }, identifier, WTFMove(connection)); >+ completionHandler(WTFMove(handle)); >+ }); >+} >+ > } // namespace WebCore > > >diff --git a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.h b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.h >index 089c187d16b648646dc4a71455043fa6b41f40a6..93ccfdc4e1f4c2ae16218277d1c475d0e1671e6b 100644 >--- a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.h >+++ b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.h >@@ -29,7 +29,9 @@ > > namespace WebCore { > >+class FileSystemDirectoryHandleIterator; > class FileSystemFileHandle; >+template<typename> class ExceptionOr; > > class FileSystemDirectoryHandle final : public FileSystemHandle { > WTF_MAKE_ISO_ALLOCATED(FileSystemDirectoryHandle); >@@ -52,6 +54,9 @@ public: > void removeEntry(const String& name, std::optional<RemoveOptions>, DOMPromiseDeferred<void>&&); > void resolve(const FileSystemHandle&, DOMPromiseDeferred<IDLSequence<IDLUSVString>>&&); > >+ void getHandleNames(CompletionHandler<void(ExceptionOr<Vector<String>>&&)>&&); >+ void getHandle(const String& name, CompletionHandler<void(ExceptionOr<Ref<FileSystemHandle>>&&)>&&); >+ > private: > FileSystemDirectoryHandle(String&&, FileSystemHandleIdentifier, Ref<FileSystemStorageConnection>&&); > }; >diff --git a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.idl b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.idl >index 8613a22667773d2a6a799420c85311aa908a083f..2a519c7b352e2dfe3670cea1b92f74105a39d5aa 100644 >--- a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.idl >+++ b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.idl >@@ -44,4 +44,9 @@ dictionary FileSystemRemoveOptions { > Promise<FileSystemDirectoryHandle> getDirectoryHandle(USVString name, optional FileSystemGetDirectoryOptions options); > Promise<undefined> removeEntry(USVString name, optional FileSystemRemoveOptions options); > Promise<sequence<USVString>?> resolve(FileSystemHandle possibleDescendant); >+ >+ // FIXME: This interface should be AsyncIterable, which is not supported by bindings code generator yet. >+ [Custom] any entries(); >+ [Custom] any keys(); >+ [Custom] any values(); > }; >diff --git a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandleIterator.cpp b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandleIterator.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..2446c22beb4c672e405e8f5ac98c546ffac6ddfe >--- /dev/null >+++ b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandleIterator.cpp >@@ -0,0 +1,111 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "FileSystemDirectoryHandleIterator.h" >+ >+#include "JSDOMPromiseDeferred.h" >+#include "JSFileSystemDirectoryHandleIterator.h" >+#include "JSFileSystemHandle.h" >+#include <JavaScriptCore/IteratorOperations.h> >+#include <JavaScriptCore/JSArray.h> >+#include <wtf/CompletionHandler.h> >+ >+namespace WebCore { >+ >+Ref<FileSystemDirectoryHandleIterator> FileSystemDirectoryHandleIterator::create(Type type, FileSystemDirectoryHandle& source) >+{ >+ return adoptRef(*new FileSystemDirectoryHandleIterator(type, source)); >+} >+ >+FileSystemDirectoryHandleIterator::FileSystemDirectoryHandleIterator(Type type, FileSystemDirectoryHandle& source) >+ : m_type(type) >+ , m_source(source) >+{ >+} >+ >+void FileSystemDirectoryHandleIterator::next(Ref<DeferredPromise>&& promise) >+{ >+ if (!m_isInitialized) { >+ m_source->getHandleNames([this, protectedThis = Ref { *this }, promise = WTFMove(promise)](auto result) mutable { >+ m_isInitialized = true; >+ if (result.hasException()) >+ return promise->reject(result.releaseException()); >+ >+ m_keys = result.releaseReturnValue(); >+ advance(WTFMove(promise)); >+ }); >+ return; >+ } >+ >+ advance(WTFMove(promise)); >+} >+ >+void FileSystemDirectoryHandleIterator::advance(Ref<DeferredPromise>&& promise) >+{ >+ auto* globalObject = promise->globalObject(); >+ if (!globalObject) >+ return; >+ >+ if (m_index >= m_keys.size()) >+ return promise->resolveWithJSValue(JSC::jsUndefined()); >+ >+ auto key = m_keys[m_index++]; >+ m_source->getHandle(key, [this, protectedThis = Ref { *this }, promise = WTFMove(promise), key](auto result) mutable { >+ auto* globalObject = promise->globalObject(); >+ if (!globalObject) >+ return; >+ >+ if (result.hasException()) { >+ // The file may be deleted, so let's advance to next position. >+ if (result.exception().code() == ExceptionCode::NotFoundError) >+ return advance(WTFMove(promise)); >+ >+ return promise->reject(result.releaseException()); >+ } >+ >+ JSC::VM& vm = globalObject->vm(); >+ Locker<JSC::JSLock> locker(vm.apiLock()); >+ >+ JSC::JSValue result; >+ if (m_type == Type::Key) >+ result = toJS<IDLDOMString>(*globalObject, *globalObject, key); >+ else if (m_type == Type::Value) >+ result = toJS<IDLInterface<FileSystemHandle>>(*globalObject, *globalObject, result.releaseReturnValue()); >+ else { >+ JSC::MarkedArgumentBuffer arguments; >+ auto jsKey = toJS<IDLDOMString>(*globalObject, *globalObject, key); >+ auto jsValue = toJS<IDLInterface<FileSystemHandle>>(*globalObject, *globalObject, result.releaseReturnValue()); >+ JSC::MarkedArgumentBuffer arguments; >+ arguments.append(jsKey); >+ arguments.append(jsValue); >+ result = constructArray(globalObject, static_cast<JSC::ArrayAllocationProfile*>(nullptr), arguments); >+ } >+ >+ return promise->resolveWithJSValue(result); >+ }); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandleIterator.h b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandleIterator.h >new file mode 100644 >index 0000000000000000000000000000000000000000..39cfb8192dbe0a27b620d41e2c9a0021dabfcb79 >--- /dev/null >+++ b/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandleIterator.h >@@ -0,0 +1,57 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "FileSystemDirectoryHandle.h" >+#include "IDLTypes.h" >+#include <wtf/Deque.h> >+ >+namespace JSC { >+class JSGlobalObject; >+} >+ >+namespace WebCore { >+ >+class DeferredPromise; >+ >+class FileSystemDirectoryHandleIterator : public RefCounted<FileSystemDirectoryHandleIterator> { >+public: >+ enum class Type : uint8_t { Key, Value, KeyAndValue }; >+ static Ref<FileSystemDirectoryHandleIterator> create(Type, FileSystemDirectoryHandle&); >+ void next(Ref<DeferredPromise>&&); >+ >+private: >+ FileSystemDirectoryHandleIterator(Type, FileSystemDirectoryHandle&); >+ void advance(Ref<DeferredPromise>&&); >+ >+ Type m_type; >+ Ref<FileSystemDirectoryHandle> m_source; >+ Vector<String> m_keys; >+ size_t m_index { 0 }; >+ bool m_isInitialized { false }; >+}; >+ >+} // namespace WebCore >diff --git a/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp b/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp >index b212547b5fe9b9bd2567fb1b09480bbdd0f19f67..70975a130e2d52a7851046d3bd0723a9a96fba14 100644 >--- a/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp >+++ b/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp >@@ -46,7 +46,7 @@ FileSystemFileHandle::FileSystemFileHandle(String&& name, FileSystemHandleIdenti > > void FileSystemFileHandle::getFile(DOMPromiseDeferred<IDLInterface<File>>&& promise) > { >- promise.reject(Exception { NotSupportedError, "Not implemented"_s }); >+ promise.reject(Exception { NotSupportedError, "getFile is not implemented"_s }); > } > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h b/Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h >index e605a67d92ab436fd6483e378b6f638b4d81aa0d..259901a5de4f7a176827bfaa7877bfce93032cf6 100644 >--- a/Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h >+++ b/Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h >@@ -42,11 +42,15 @@ public: > using GetHandleCallback = CompletionHandler<void(ExceptionOr<FileSystemHandleIdentifier>&&)>; > using RemoveEntryCallback = CompletionHandler<void(ExceptionOr<void>&&)>; > using ResolveCallback = CompletionHandler<void(ExceptionOr<Vector<String>>&&)>; >+ using GetHandleNamesCallback = CompletionHandler<void(ExceptionOr<Vector<String>>&&)>; >+ using GetHandleWithTypeCallback = CompletionHandler<void(ExceptionOr<std::pair<FileSystemHandleIdentifier, bool>>&&)>; > virtual void isSameEntry(FileSystemHandleIdentifier, FileSystemHandleIdentifier, SameEntryCallback&&) = 0; > virtual void getFileHandle(FileSystemHandleIdentifier, const String& name, bool createIfNecessary, GetHandleCallback&&) = 0; > virtual void getDirectoryHandle(FileSystemHandleIdentifier, const String& name, bool createIfNecessary, GetHandleCallback&&) = 0; > virtual void removeEntry(FileSystemHandleIdentifier, const String& name, bool deleteRecursively, RemoveEntryCallback&&) = 0; > virtual void resolve(FileSystemHandleIdentifier, FileSystemHandleIdentifier, ResolveCallback&&) = 0; >+ virtual void getHandleNames(FileSystemHandleIdentifier, GetHandleNamesCallback&&) = 0; >+ virtual void getHandle(FileSystemHandleIdentifier, const String& name, GetHandleWithTypeCallback&&) = 0; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp b/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp >index 45eb3ec95b7651e7c15e30a699c474b6552d43cd..815ec044f14367a7d8ab03f986f5e7a79756bbdc 100644 >--- a/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp >+++ b/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp >@@ -199,4 +199,56 @@ void WorkerFileSystemStorageConnection::didResolve(CallbackIdentifier callbackId > callback(WTFMove(result)); > } > >+void WorkerFileSystemStorageConnection::getHandleNames(FileSystemHandleIdentifier identifier, GetHandleNamesCallback&& callback) >+{ >+ if (!m_scope) >+ return callback(Exception { InvalidStateError }); >+ >+ auto callbackIdentifier = CallbackIdentifier::generateThreadSafe(); >+ m_getHandleNamesCallbacks.add(callbackIdentifier, WTFMove(callback)); >+ >+ callOnMainThread([callbackIdentifier, workerThread = Ref { m_scope->thread() }, mainThreadConnection = m_mainThreadConnection, identifier]() mutable { >+ auto mainThreadCallback = [callbackIdentifier, workerThread = WTFMove(workerThread)](auto result) mutable { >+ workerThread->runLoop().postTaskForMode([callbackIdentifier, result = crossThreadCopy(result)] (auto& scope) mutable { >+ if (auto connection = downcast<WorkerGlobalScope>(scope).fileSystemStorageConnection()) >+ connection->didGetHandleNames(callbackIdentifier, WTFMove(result)); >+ }, WorkerRunLoop::defaultMode()); >+ }; >+ >+ mainThreadConnection->getHandleNames(identifier, WTFMove(mainThreadCallback)); >+ }); >+} >+ >+void WorkerFileSystemStorageConnection::didGetHandleNames(CallbackIdentifier callbackIdentifier, ExceptionOr<Vector<String>>&& result) >+{ >+ if (auto callback = m_getHandleNamesCallbacks.take(callbackIdentifier)) >+ callback(WTFMove(result)); >+} >+ >+void WorkerFileSystemStorageConnection::getHandle(FileSystemHandleIdentifier identifier, const String& name, GetHandleWithTypeCallback&& callback) >+{ >+ if (!m_scope) >+ return callback(Exception { InvalidStateError }); >+ >+ auto callbackIdentifier = CallbackIdentifier::generateThreadSafe(); >+ m_getHandleWithTypeCallbacks.add(callbackIdentifier, WTFMove(callback)); >+ >+ callOnMainThread([callbackIdentifier, workerThread = Ref { m_scope->thread() }, mainThreadConnection = m_mainThreadConnection, identifier, name = name.isolatedCopy()]() mutable { >+ auto mainThreadCallback = [callbackIdentifier, workerThread = WTFMove(workerThread)](auto result) mutable { >+ workerThread->runLoop().postTaskForMode([callbackIdentifier, result = crossThreadCopy(result)] (auto& scope) mutable { >+ if (auto connection = downcast<WorkerGlobalScope>(scope).fileSystemStorageConnection()) >+ connection->didGetHandleWithType(callbackIdentifier, WTFMove(result)); >+ }, WorkerRunLoop::defaultMode()); >+ }; >+ >+ mainThreadConnection->getHandle(identifier, name, WTFMove(mainThreadCallback)); >+ }); >+} >+ >+void WorkerFileSystemStorageConnection::didGetHandleWithType(CallbackIdentifier callbackIdentifier, ExceptionOr<std::pair<FileSystemHandleIdentifier, bool>>&& result) >+{ >+ if (auto callback = m_getHandleWithTypeCallbacks.take(callbackIdentifier)) >+ callback(WTFMove(result)); >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h b/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h >index ec69d175a2f759f06b3f1c54744d710c9e61c3ac..fe5be9869a10aa6db0305e31af686d26e9888fc2 100644 >--- a/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h >+++ b/Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h >@@ -48,6 +48,8 @@ public: > void didGetHandle(CallbackIdentifier, ExceptionOr<FileSystemHandleIdentifier>&&); > void didRemoveEntry(CallbackIdentifier, ExceptionOr<void>&&); > void didResolve(CallbackIdentifier, ExceptionOr<Vector<String>>&&); >+ void didGetHandleNames(CallbackIdentifier, ExceptionOr<Vector<String>>&&); >+ void didGetHandleWithType(CallbackIdentifier, ExceptionOr<std::pair<FileSystemHandleIdentifier, bool>>&&); > > private: > WorkerFileSystemStorageConnection(WorkerGlobalScope&, Ref<FileSystemStorageConnection>&&); >@@ -58,6 +60,8 @@ private: > void getDirectoryHandle(FileSystemHandleIdentifier, const String& name, bool createIfNecessary, FileSystemStorageConnection::GetHandleCallback&&) final; > void removeEntry(FileSystemHandleIdentifier, const String& name, bool deleteRecursively, FileSystemStorageConnection::RemoveEntryCallback&&) final; > void resolve(FileSystemHandleIdentifier, FileSystemHandleIdentifier, FileSystemStorageConnection::ResolveCallback&&) final; >+ void getHandleNames(FileSystemHandleIdentifier, GetHandleNamesCallback&&) final; >+ void getHandle(FileSystemHandleIdentifier, const String& name, GetHandleWithTypeCallback&&) final; > > WeakPtr<WorkerGlobalScope> m_scope; > RefPtr<FileSystemStorageConnection> m_mainThreadConnection; >@@ -65,6 +69,8 @@ private: > HashMap<CallbackIdentifier, FileSystemStorageConnection::GetHandleCallback> m_getHandleCallbacks; > HashMap<CallbackIdentifier, FileSystemStorageConnection::RemoveEntryCallback> m_removeEntryCallbacks; > HashMap<CallbackIdentifier, FileSystemStorageConnection::ResolveCallback> m_resolveCallbacks; >+ HashMap<CallbackIdentifier, FileSystemStorageConnection::GetHandleNamesCallback> m_getHandleNamesCallbacks; >+ HashMap<CallbackIdentifier, FileSystemStorageConnection::GetHandleWithTypeCallback> m_getHandleWithTypeCallbacks; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 1eff6aeb39ba02a735f214c34fd70c1033e93f10..3b20ee06703cbfd864047cddb2b0e35408583256 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -59,6 +59,7 @@ Modules/fetch/FetchRequest.cpp > Modules/fetch/FetchResponse.cpp > Modules/fetch/WindowOrWorkerGlobalScopeFetch.cpp > Modules/filesystemaccess/FileSystemDirectoryHandle.cpp >+Modules/filesystemaccess/FileSystemDirectoryHandleIterator.cpp > Modules/filesystemaccess/FileSystemFileHandle.cpp > Modules/filesystemaccess/FileSystemHandle.cpp > Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp >@@ -493,6 +494,8 @@ bindings/js/JSExecState.cpp > bindings/js/JSExtendableMessageEventCustom.cpp > bindings/js/JSFetchEventCustom.cpp > bindings/js/JSFileSystemEntryCustom.cpp >+bindings/js/JSFileSystemDirectoryHandleCustom.cpp >+bindings/js/JSFileSystemDirectoryHandleIterator.cpp > bindings/js/JSFileSystemHandleCustom.cpp > bindings/js/JSHTMLAllCollectionCustom.cpp > bindings/js/JSHTMLCanvasElementCustom.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 614c3d70c2cb13dfc1c20cb260852670f4ed7e5a..5553b85d421161d32b0c647b021ce076df035c8f 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2821,6 +2821,7 @@ > 931CBD11161A44E900E4C874 /* ScrollingStateTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 931CBD0B161A44E900E4C874 /* ScrollingStateTree.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 931D72F615FE695300C4C07E /* LayoutMilestone.h in Headers */ = {isa = PBXBuildFile; fileRef = 931D72F515FE695300C4C07E /* LayoutMilestone.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93217ABC270632D2002E60F0 /* WorkerFileSystemStorageConnectionCallbackIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 93217ABB270632D2002E60F0 /* WorkerFileSystemStorageConnectionCallbackIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 93217AC52706A9DB002E60F0 /* FileSystemDirectoryHandleIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 93217AC22706A9DA002E60F0 /* FileSystemDirectoryHandleIterator.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 932199FA2702162500B1FAF9 /* WorkerStorageConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 932199F82702162500B1FAF9 /* WorkerStorageConnection.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93233C8627054C7900BBF41E /* WorkerFileSystemStorageConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 93233C8327054C7800BBF41E /* WorkerFileSystemStorageConnection.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 9323B07023061F9700901C8B /* IDBSerializationContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 9323B06F23061E9C00901C8B /* IDBSerializationContext.h */; }; >@@ -2963,6 +2964,7 @@ > 93D6B7A82551D41F0058DD3A /* DummySpeechRecognitionProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D6B7A62551D3ED0058DD3A /* DummySpeechRecognitionProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93D9D53C0DA27E180077216C /* RangeBoundaryPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D9D53B0DA27E180077216C /* RangeBoundaryPoint.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93E241FF0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E241FE0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 93E2699627091E60002C4FF0 /* JSFileSystemDirectoryHandleIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E2699427091E5F002C4FF0 /* JSFileSystemDirectoryHandleIterator.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93E2A307123E9DC0009FE12A /* HTMLParserIdioms.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E2A305123E9DC0009FE12A /* HTMLParserIdioms.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93E5B2652455E96F005C52D0 /* AttributedString.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E5B2632455E96F005C52D0 /* AttributedString.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = F523D23C02DE4396018635CA /* HTMLDocument.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -11712,6 +11714,8 @@ > 931CBD0B161A44E900E4C874 /* ScrollingStateTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingStateTree.h; sourceTree = "<group>"; }; > 931D72F515FE695300C4C07E /* LayoutMilestone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutMilestone.h; sourceTree = "<group>"; }; > 93217ABB270632D2002E60F0 /* WorkerFileSystemStorageConnectionCallbackIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerFileSystemStorageConnectionCallbackIdentifier.h; sourceTree = "<group>"; }; >+ 93217AC02706A9D9002E60F0 /* FileSystemDirectoryHandleIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemDirectoryHandleIterator.cpp; sourceTree = "<group>"; }; >+ 93217AC22706A9DA002E60F0 /* FileSystemDirectoryHandleIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileSystemDirectoryHandleIterator.h; sourceTree = "<group>"; }; > 932199F62702162400B1FAF9 /* WorkerStorageConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerStorageConnection.cpp; sourceTree = "<group>"; }; > 932199F82702162500B1FAF9 /* WorkerStorageConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerStorageConnection.h; sourceTree = "<group>"; }; > 93233C8327054C7800BBF41E /* WorkerFileSystemStorageConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerFileSystemStorageConnection.h; sourceTree = "<group>"; }; >@@ -11994,6 +11998,9 @@ > 93E227DF0AF589AD00D48324 /* SubresourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SubresourceLoader.cpp; sourceTree = "<group>"; }; > 93E241FE0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLFrameOwnerElement.h; sourceTree = "<group>"; }; > 93E2425E0B2B509500C732A1 /* HTMLFrameOwnerElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFrameOwnerElement.cpp; sourceTree = "<group>"; }; >+ 93E2699327091E5F002C4FF0 /* JSFileSystemDirectoryHandleIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileSystemDirectoryHandleIterator.cpp; sourceTree = "<group>"; }; >+ 93E2699427091E5F002C4FF0 /* JSFileSystemDirectoryHandleIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileSystemDirectoryHandleIterator.h; sourceTree = "<group>"; }; >+ 93E2699727095CDC002C4FF0 /* JSFileSystemDirectoryHandleCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileSystemDirectoryHandleCustom.cpp; sourceTree = "<group>"; }; > 93E2A304123E9DC0009FE12A /* HTMLParserIdioms.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLParserIdioms.cpp; sourceTree = "<group>"; }; > 93E2A305123E9DC0009FE12A /* HTMLParserIdioms.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLParserIdioms.h; sourceTree = "<group>"; }; > 93E5B25424536B1E005C52D0 /* URLDecomposition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLDecomposition.cpp; sourceTree = "<group>"; }; >@@ -23100,6 +23107,7 @@ > BC60901E0E91B8EC000C68B5 /* JSEventTargetCustom.cpp */, > 46B63F6B1C6E8CDF002E914B /* JSEventTargetCustom.h */, > 4131F3B11F9552810059995A /* JSFetchEventCustom.cpp */, >+ 93E2699727095CDC002C4FF0 /* JSFileSystemDirectoryHandleCustom.cpp */, > 835B680E1F548BDE0071F7F6 /* JSFileSystemEntryCustom.cpp */, > 931A1BDD26F7ED090081A7E5 /* JSFileSystemHandleCustom.cpp */, > 84BBE5482597E7F100AA8F28 /* JSHTMLAllCollectionCustom.cpp */, >@@ -23430,6 +23438,8 @@ > 932C9BD526DD625B0053B3DB /* FileSystemDirectoryHandle.cpp */, > 932C9BD426DD625A0053B3DB /* FileSystemDirectoryHandle.h */, > 932C9BD226DD62570053B3DB /* FileSystemDirectoryHandle.idl */, >+ 93217AC02706A9D9002E60F0 /* FileSystemDirectoryHandleIterator.cpp */, >+ 93217AC22706A9DA002E60F0 /* FileSystemDirectoryHandleIterator.h */, > 932C9BD326DD62590053B3DB /* FileSystemFileHandle.cpp */, > 932C9BD626DD625C0053B3DB /* FileSystemFileHandle.h */, > 932C9BCE26DD62520053B3DB /* FileSystemFileHandle.idl */, >@@ -27517,6 +27527,8 @@ > 8F934D841189F1EE00508D5D /* JSExecState.cpp */, > 8F934D831189F1EE00508D5D /* JSExecState.h */, > B56576E417DA599F00A56BDC /* JSExecStateInstrumentation.h */, >+ 93E2699327091E5F002C4FF0 /* JSFileSystemDirectoryHandleIterator.cpp */, >+ 93E2699427091E5F002C4FF0 /* JSFileSystemDirectoryHandleIterator.h */, > 93849C1624BE12E500448D5A /* JSIDBSerializationGlobalObject.cpp */, > 93849C2124BEDD8800448D5A /* JSIDBSerializationGlobalObject.h */, > E3C9AEC92113147400419B92 /* JSMicrotaskCallback.h */, >@@ -32551,6 +32563,7 @@ > 2EF1BFF9121CB0CE00C27627 /* FileStreamClient.h in Headers */, > 83FB33711F508A5400986E54 /* FileSystemDirectoryEntry.h in Headers */, > 93443E8626E995BD0058538F /* FileSystemDirectoryHandle.h in Headers */, >+ 93217AC52706A9DB002E60F0 /* FileSystemDirectoryHandleIterator.h in Headers */, > 830335021F549057004DF707 /* FileSystemDirectoryReader.h in Headers */, > 830335031F54905A004DF707 /* FileSystemEntriesCallback.h in Headers */, > 83FB33731F508A5800986E54 /* FileSystemEntry.h in Headers */, >@@ -33417,6 +33430,7 @@ > 2E94F43C119207DA00B7F75D /* JSFileReader.h in Headers */, > 898785F5122E1EAC003AABDA /* JSFileReaderSync.h in Headers */, > 833B9E321F508D8500E0E428 /* JSFileSystemDirectoryEntry.h in Headers */, >+ 93E2699627091E60002C4FF0 /* JSFileSystemDirectoryHandleIterator.h in Headers */, > 836589DE1F54A76900DC31F4 /* JSFileSystemDirectoryReader.h in Headers */, > 836589E01F54A76E00DC31F4 /* JSFileSystemEntriesCallback.h in Headers */, > 833B9E341F508D8500E0E428 /* JSFileSystemEntry.h in Headers */, >diff --git a/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleCustom.cpp b/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleCustom.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..e86ad67f3a40e2cd644bf303de726102aabd21e1 >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleCustom.cpp >@@ -0,0 +1,48 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "JSFileSystemDirectoryHandle.h" >+ >+#include "JSFileSystemDirectoryHandleIterator.h" >+ >+namespace WebCore { >+ >+JSC::JSValue JSFileSystemDirectoryHandle::entries(JSC::JSGlobalObject&, JSC::CallFrame&) >+{ >+ return createIterator(*globalObject(), *this, JSC::IterationKind::Entries); >+} >+ >+JSC::JSValue JSFileSystemDirectoryHandle::keys(JSC::JSGlobalObject&, JSC::CallFrame&) >+{ >+ return createIterator(*globalObject(), *this, JSC::IterationKind::Keys); >+} >+ >+JSC::JSValue JSFileSystemDirectoryHandle::values(JSC::JSGlobalObject&, JSC::CallFrame&) >+{ >+ return createIterator(*globalObject(), *this, JSC::IterationKind::Values); >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.cpp b/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..6127b948c0b4bd0c7193cbe496b48d0f7d3bce76 >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.cpp >@@ -0,0 +1,194 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "JSFileSystemDirectoryHandleIterator.h" >+ >+#include "JSDOMOperation.h" >+#include "JSDOMPromiseDeferred.h" >+#include "WebCoreJSClientData.h" >+#include <JavaScriptCore/JSBoundFunction.h> >+#include <JavaScriptCore/JSDestructibleObjectHeapCellType.h> >+#include <JavaScriptCore/SlotVisitorMacros.h> >+ >+namespace WebCore { >+ >+using namespace JSC; >+ >+static JSC_DECLARE_HOST_FUNCTION(jsFileSystemDirectoryHandleIterator_runNextSteps); >+static JSC_DECLARE_HOST_FUNCTION(jsFileSystemDirectoryHandleIterator_onPromiseFulfilled); >+static JSC_DECLARE_HOST_FUNCTION(jsFileSystemDirectoryHandleIterator_onPromiseRejected); >+ >+JSC_ANNOTATE_HOST_FUNCTION(JSFileSystemDirectoryHandleIteratorPrototypeNext, JSFileSystemDirectoryHandleIteratorPrototype::next); >+ >+const JSC::ClassInfo JSFileSystemDirectoryHandleIterator::s_info = { "Handle Iterator", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFileSystemDirectoryHandleIterator) }; >+const JSC::ClassInfo JSFileSystemDirectoryHandleIteratorPrototype::s_info = { "Handle Iterator", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSFileSystemDirectoryHandleIteratorPrototype) }; >+ >+JSFileSystemDirectoryHandleIterator* createIterator(JSDOMGlobalObject& globalObject, JSFileSystemDirectoryHandle& wrapper, JSC::IterationKind kind) >+{ >+ return JSFileSystemDirectoryHandleIterator::create(globalObject.vm(), getDOMStructure<JSFileSystemDirectoryHandleIterator>(globalObject.vm(), globalObject), wrapper, kind); >+} >+ >+JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSFileSystemDirectoryHandleIteratorPrototype::next(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame) >+{ >+ JSC::VM& vm = globalObject->vm(); >+ auto scope = DECLARE_THROW_SCOPE(vm); >+ auto* iterator = JSC::jsDynamicCast<JSFileSystemDirectoryHandleIterator*>(vm, callFrame->thisValue()); >+ if (!iterator) >+ return JSC::JSValue::encode(throwTypeError(globalObject, scope, "Cannot call next() on this object"_s)); >+ >+ return JSC::JSValue::encode(iterator->next(*globalObject)); >+} >+ >+void JSFileSystemDirectoryHandleIteratorPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject) >+{ >+ Base::finishCreation(vm); >+ ASSERT(inherits(vm, info())); >+ >+ JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->next, next, 0, 0, JSC::NoIntrinsic); >+ JSC_TO_STRING_TAG_WITHOUT_TRANSITION(); >+} >+ >+inline JSC::EncodedJSValue jsFileSystemDirectoryHandleIterator_onPromiseFulfilledBody(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame, JSFileSystemDirectoryHandleIterator* castedThis) >+{ >+ castedThis->didSettlePromise(); >+ JSC::JSValue result = callFrame->argument(0); >+ if (result.isUndefined()) { >+ castedThis->didFinish(); >+ return JSC::JSValue::encode(createIteratorResultObject(globalObject, result, true)); >+ } >+ >+ return JSC::JSValue::encode(createIteratorResultObject(globalObject, result, false)); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsFileSystemDirectoryHandleIterator_onPromiseFulfilled, (JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame)) >+{ >+ return IDLOperation<JSFileSystemDirectoryHandleIterator>::call<jsFileSystemDirectoryHandleIterator_onPromiseFulfilledBody>(*globalObject, *callFrame, "onPromiseFulfilled"); >+} >+ >+inline JSC::EncodedJSValue jsFileSystemDirectoryHandleIterator_onPromiseRejectedBody(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame, JSFileSystemDirectoryHandleIterator* castedThis) >+{ >+ JSC::VM& vm = globalObject->vm(); >+ auto scope = DECLARE_THROW_SCOPE(vm); >+ JSC::JSValue reason = callFrame->argument(0); >+ castedThis->didSettlePromise(); >+ castedThis->didFinish(); >+ return throwVMError(globalObject, scope, reason); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsFileSystemDirectoryHandleIterator_onPromiseRejected, (JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame)) >+{ >+ return IDLOperation<JSFileSystemDirectoryHandleIterator>::call<jsFileSystemDirectoryHandleIterator_onPromiseRejectedBody>(*globalObject, *callFrame, "onPromiseRejected"); >+} >+ >+JSC::JSPromise* JSFileSystemDirectoryHandleIterator::getNextIterationResult(JSC::JSGlobalObject& globalObject) >+{ >+ JSC::VM& vm = JSC::getVM(&globalObject); >+ auto* promise = JSC::JSPromise::create(vm, globalObject.promiseStructure()); >+ ASSERT(m_iterator); >+ m_iterator->next(DeferredPromise::create(*this->globalObject(), *promise)); >+ return promise; >+} >+ >+JSC::JSPromise* JSFileSystemDirectoryHandleIterator::runNextSteps(JSC::JSGlobalObject* globalObject) >+{ >+ JSC::VM& vm = globalObject->vm(); >+ auto nextPromiseCapability = JSC::JSPromise::createNewPromiseCapability(globalObject, globalObject->promiseConstructor()); >+ auto data = JSC::JSPromise::convertCapabilityToDeferredData(globalObject, nextPromiseCapability); >+ if (isFinished()) { >+ data.promise->resolve(globalObject, createIteratorResultObject(globalObject, JSC::jsUndefined(), true)); >+ return data.promise; >+ } >+ >+ auto nextPromise = getNextIterationResult(*globalObject); >+ auto onFulfilled = JSC::JSFunction::create(vm, globalObject, 1, String(), jsFileSystemDirectoryHandleIterator_onPromiseFulfilled); >+ auto boundedOnFulFilled = JSC::JSBoundFunction::create(vm, globalObject, onFulfilled, this, nullptr, 1, nullptr); >+ auto onRejected = JSC::JSFunction::create(vm, globalObject, 1, String(), jsFileSystemDirectoryHandleIterator_onPromiseRejected); >+ auto boundedOnRejected = JSC::JSBoundFunction::create(vm, globalObject, onRejected, this, nullptr, 1, nullptr); >+ nextPromise->performPromiseThen(globalObject, boundedOnFulFilled, boundedOnRejected, nextPromiseCapability); >+ return data.promise; >+} >+ >+inline JSC::JSValue jsFileSystemDirectoryHandleIterator_runNextStepsBody(JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame) >+{ >+ JSC::VM& vm = globalObject->vm(); >+ JSC::JSValue thisValue = callFrame->thisValue(); >+ auto* iterator = JSC::jsDynamicCast<JSFileSystemDirectoryHandleIterator*>(vm, thisValue); >+ return iterator->runNextSteps(globalObject); >+} >+ >+JSC_DEFINE_HOST_FUNCTION(jsFileSystemDirectoryHandleIterator_runNextSteps, (JSC::JSGlobalObject* globalObject, JSC::CallFrame* callFrame)) >+{ >+ return JSC::JSValue::encode(jsFileSystemDirectoryHandleIterator_runNextStepsBody(globalObject, callFrame)); >+} >+ >+JSC::JSValue JSFileSystemDirectoryHandleIterator::next(JSC::JSGlobalObject& globalObject) >+{ >+ JSC::VM& vm = globalObject.vm(); >+ if (!m_ongoingPromise || !m_ongoingPromise->promise()) >+ m_ongoingPromise = DOMPromise::create(*this->globalObject(), *runNextSteps(&globalObject)); >+ else { >+ auto afterOngoingPromiseCapability = JSC::JSPromise::createNewPromiseCapability(&globalObject, globalObject.promiseConstructor()); >+ auto data = JSC::JSPromise::convertCapabilityToDeferredData(&globalObject, afterOngoingPromiseCapability); >+ auto onSettled = JSC::JSFunction::create(vm, &globalObject, 0, String(), jsFileSystemDirectoryHandleIterator_runNextSteps); >+ auto boundedOnSettled = JSC::JSBoundFunction::create(vm, &globalObject, onSettled, this, nullptr, 1, nullptr); >+ JSC::JSPromise* ongoingPromise = m_ongoingPromise->promise(); >+ ongoingPromise->performPromiseThen(&globalObject, boundedOnSettled, boundedOnSettled, afterOngoingPromiseCapability); >+ m_ongoingPromise = DOMPromise::create(*this->globalObject(), *data.promise); >+ } >+ >+ return m_ongoingPromise->promise(); >+} >+ >+void JSFileSystemDirectoryHandleIterator::destroy(JSC::JSCell* cell) >+{ >+ JSFileSystemDirectoryHandleIterator* thisObject = static_cast<JSFileSystemDirectoryHandleIterator*>(cell); >+ thisObject->JSFileSystemDirectoryHandleIterator::~JSFileSystemDirectoryHandleIterator(); >+} >+ >+IsoSubspace* JSFileSystemDirectoryHandleIterator::subspaceForImpl(VM& vm) >+{ >+ JSC::JSLockHolder apiLocker(vm); >+ auto& clientData = *static_cast<JSVMClientData*>(vm.clientData); >+ if (auto* space = clientData.fileSystemDirectoryHandleIteratorSpace()) >+ return space; >+ static_assert(std::is_base_of_v<JSC::JSDestructibleObject, JSFileSystemDirectoryHandleIterator> || !JSFileSystemDirectoryHandleIterator::needsDestruction); >+ if constexpr (std::is_base_of_v<JSC::JSDestructibleObject, JSFileSystemDirectoryHandleIterator>) >+ clientData.setFileSystemDirectoryHandleIteratorSpace(makeUnique<IsoSubspace> ISO_SUBSPACE_INIT(vm.heap, vm.destructibleObjectHeapCellType.get(), JSFileSystemDirectoryHandleIterator)); >+ else >+ clientData.setFileSystemDirectoryHandleIteratorSpace(makeUnique<IsoSubspace> ISO_SUBSPACE_INIT(vm.heap, vm.cellHeapCellType.get(), JSFileSystemDirectoryHandleIterator)); >+ auto* space = clientData.fileSystemDirectoryHandleIteratorSpace(); >+IGNORE_WARNINGS_BEGIN("unreachable-code") >+IGNORE_WARNINGS_BEGIN("tautological-compare") >+ void (*myVisitOutputConstraint)(JSC::JSCell*, JSC::SlotVisitor&) = JSFileSystemDirectoryHandleIterator::visitOutputConstraints; >+ void (*jsCellVisitOutputConstraint)(JSC::JSCell*, JSC::SlotVisitor&) = JSC::JSCell::visitOutputConstraints; >+ if (myVisitOutputConstraint != jsCellVisitOutputConstraint) >+ clientData.outputConstraintSpaces().append(space); >+IGNORE_WARNINGS_END >+IGNORE_WARNINGS_END >+ return space; >+} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.h b/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.h >new file mode 100644 >index 0000000000000000000000000000000000000000..92e1a6ee8aa82b1599a8922605d5b2fc82c8a820 >--- /dev/null >+++ b/Source/WebCore/bindings/js/JSFileSystemDirectoryHandleIterator.h >@@ -0,0 +1,143 @@ >+/* >+ * Copyright (C) 2021 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include "FileSystemDirectoryHandleIterator.h" >+#include "JSDOMPromise.h" >+#include "JSFileSystemDirectoryHandle.h" >+#include "WebCoreJSClientData.h" >+#include <JavaScriptCore/AsyncIteratorPrototype.h> >+#include <JavaScriptCore/IterationKind.h> >+ >+namespace WebCore { >+ >+class JSFileSystemDirectoryHandleIteratorPrototype final : public JSC::JSNonFinalObject { >+public: >+ using Base = JSC::JSNonFinalObject; >+ >+ template<typename CellType, JSC::SubspaceAccess> >+ static JSC::IsoSubspace* subspaceFor(JSC::VM& vm) >+ { >+ STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFileSystemDirectoryHandleIteratorPrototype, Base); >+ return &vm.plainObjectSpace; >+ } >+ >+ static JSFileSystemDirectoryHandleIteratorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) >+ { >+ STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFileSystemDirectoryHandleIteratorPrototype, JSFileSystemDirectoryHandleIteratorPrototype::Base); >+ JSFileSystemDirectoryHandleIteratorPrototype* prototype = new (NotNull, JSC::allocateCell<JSFileSystemDirectoryHandleIteratorPrototype>(vm.heap)) JSFileSystemDirectoryHandleIteratorPrototype(vm, structure); >+ prototype->finishCreation(vm, globalObject); >+ return prototype; >+ } >+ >+ DECLARE_INFO; >+ >+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) >+ { >+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); >+ } >+ >+ static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES next(JSC::JSGlobalObject*, JSC::CallFrame*); >+ >+private: >+ JSFileSystemDirectoryHandleIteratorPrototype(JSC::VM& vm, JSC::Structure* structure) >+ : Base(vm, structure) >+ { >+ } >+ >+ void finishCreation(JSC::VM&, JSC::JSGlobalObject*); >+}; >+ >+class JSFileSystemDirectoryHandleIterator final : public JSDOMObject { >+public: >+ using Base = JSDOMObject; >+ using Prototype = JSFileSystemDirectoryHandleIteratorPrototype; >+ >+ DECLARE_INFO; >+ >+ template<typename CellType, JSC::SubspaceAccess mode> >+ static JSC::IsoSubspace* subspaceFor(JSC::VM& vm) >+ { >+ if constexpr (mode == JSC::SubspaceAccess::Concurrently) >+ return nullptr; >+ return subspaceForImpl(vm); >+ } >+ static JSC::IsoSubspace* subspaceForImpl(JSC::VM&); >+ >+ static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) >+ { >+ return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); >+ } >+ >+ static JSFileSystemDirectoryHandleIterator* create(JSC::VM& vm, JSC::Structure* structure, JSFileSystemDirectoryHandle& source, JSC::IterationKind kind) >+ { >+ auto* instance = new (NotNull, JSC::allocateCell<JSFileSystemDirectoryHandleIterator>(vm.heap)) JSFileSystemDirectoryHandleIterator(structure, source, kind); >+ instance->finishCreation(vm); >+ return instance; >+ } >+ >+ static Prototype* createPrototype(JSC::VM& vm, JSC::JSGlobalObject& globalObject) >+ { >+ return Prototype::create(vm, &globalObject, Prototype::createStructure(vm, &globalObject, globalObject.asyncIteratorPrototype())); >+ } >+ >+ JSC::JSValue next(JSC::JSGlobalObject&); >+ JSC::JSPromise* runNextSteps(JSC::JSGlobalObject*); >+ JSC::JSPromise* getNextIterationResult(JSC::JSGlobalObject&); >+ void didSettlePromise() { m_ongoingPromise = nullptr; } >+ void didFinish() { m_iterator = nullptr; } >+ bool isFinished() { return !m_iterator; } >+ >+protected: >+ JSFileSystemDirectoryHandleIterator(JSC::Structure* structure, JSFileSystemDirectoryHandle& iteratedObject, JSC::IterationKind kind) >+ : Base(structure, *iteratedObject.globalObject()) >+ , m_kind(kind) >+ { >+ FileSystemDirectoryHandleIterator::Type type; >+ switch (kind) { >+ case JSC::IterationKind::Keys: >+ type = FileSystemDirectoryHandleIterator::Type::Key; >+ break; >+ case JSC::IterationKind::Values: >+ type = FileSystemDirectoryHandleIterator::Type::Value; >+ break; >+ case JSC::IterationKind::Entries: >+ type = FileSystemDirectoryHandleIterator::Type::KeyAndValue; >+ } >+ m_iterator = FileSystemDirectoryHandleIterator::create(type, iteratedObject.wrapped()); >+ } >+ >+ static void destroy(JSC::JSCell*); >+ >+ RefPtr<FileSystemDirectoryHandleIterator> m_iterator; >+ JSC::IterationKind m_kind; >+ RefPtr<DOMPromise> m_ongoingPromise; >+}; >+ >+JSFileSystemDirectoryHandleIterator* createIterator(JSDOMGlobalObject&, JSFileSystemDirectoryHandle&, JSC::IterationKind); >+ >+} // namespace WebCore >+ >diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >index e835df7ff0b220deba058fd3a84df5d2c251395c..f74d5c93826e72b9ffc7bbec7169ed1b2cb07d48 100644 >--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h >@@ -119,6 +119,7 @@ namespace WebCore { > macro(FileSystem) \ > macro(FileSystemDirectoryEntry) \ > macro(FileSystemDirectoryHandle) \ >+ macro(FileSystemDirectoryHandleIterator) \ > macro(FileSystemDirectoryReader) \ > macro(FileSystemEntry) \ > macro(FileSystemFileEntry) \ >diff --git a/Source/WebCore/bindings/js/WebCoreJSClientData.h b/Source/WebCore/bindings/js/WebCoreJSClientData.h >index df957855d7c30564d6832ae0b1173d0773e0a3af..c03fcdeffba284cac08389b46136de88b41840dc 100644 >--- a/Source/WebCore/bindings/js/WebCoreJSClientData.h >+++ b/Source/WebCore/bindings/js/WebCoreJSClientData.h >@@ -71,6 +71,8 @@ public: > JSC::IsoSubspace& runtimeObjectSpace() { return m_runtimeObjectSpace; } > JSC::IsoSubspace& windowProxySpace() { return m_windowProxySpace; } > JSC::IsoSubspace& idbSerializationSpace() { return m_idbSerializationSpace; } >+ JSC::IsoSubspace* fileSystemDirectoryHandleIteratorSpace() { return m_fileSystemDirectoryHandleIteratorSpace.get(); } >+ void setFileSystemDirectoryHandleIteratorSpace(std::unique_ptr<JSC::IsoSubspace> space) { m_fileSystemDirectoryHandleIteratorSpace = std::exchange(space, nullptr); } > > Vector<JSC::IsoSubspace*>& outputConstraintSpaces() { return m_outputConstraintSpaces; } > >@@ -121,6 +123,7 @@ private: > JSC::IsoSubspace m_runtimeObjectSpace; > JSC::IsoSubspace m_windowProxySpace; > JSC::IsoSubspace m_idbSerializationSpace; >+ std::unique_ptr<JSC::IsoSubspace> m_fileSystemDirectoryHandleIteratorSpace; > std::unique_ptr<DOMIsoSubspaces> m_subspaces; > Vector<JSC::IsoSubspace*> m_outputConstraintSpaces; > }; >diff --git a/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp b/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp >index 22bc3ef4ed278a19e2406c7940cfb6c838d92dec..d34c4e67f8ba05e2c71cb348cfcda5b1b522bd86 100644 >--- a/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp >+++ b/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp >@@ -139,4 +139,25 @@ Expected<Vector<String>, FileSystemStorageError> FileSystemStorageHandle::resolv > return restPath.split(pathSeparator); > } > >+Expected<Vector<String>, FileSystemStorageError> FileSystemStorageHandle::getHandleNames() >+{ >+ if (m_type != Type::Directory) >+ return makeUnexpected(FileSystemStorageError::TypeMismatch); >+ >+ return FileSystem::listDirectory(m_path); >+} >+ >+Expected<std::pair<WebCore::FileSystemHandleIdentifier, bool>, FileSystemStorageError> FileSystemStorageHandle::getHandle(IPC::Connection::UniqueID connection, String&& name) >+{ >+ auto result = requestCreateHandle(connection, FileSystemStorageHandle::Type::File, String { name }, false); >+ if (result) >+ return std::pair { result.value(), false }; >+ >+ result = requestCreateHandle(connection, FileSystemStorageHandle::Type::Directory, WTFMove(name), false); >+ if (result) >+ return std::pair { result.value(), true }; >+ >+ return makeUnexpected(result.error()); >+} >+ > } // namespace WebKit >diff --git a/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h b/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h >index 87990907d9b89a523f7ff1f55070a570640ab3b2..c164e3f36e611ec1a2daf34e668a19792ca4b163 100644 >--- a/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h >+++ b/Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.h >@@ -48,6 +48,8 @@ public: > Expected<WebCore::FileSystemHandleIdentifier, FileSystemStorageError> getDirectoryHandle(IPC::Connection::UniqueID, String&& name, bool createIfNecessary); > std::optional<FileSystemStorageError> removeEntry(const String& name, bool deleteRecursively); > Expected<Vector<String>, FileSystemStorageError> resolve(WebCore::FileSystemHandleIdentifier); >+ Expected<Vector<String>, FileSystemStorageError> getHandleNames(); >+ Expected<std::pair<WebCore::FileSystemHandleIdentifier, bool>, FileSystemStorageError> getHandle(IPC::Connection::UniqueID, String&& name); > > private: > Expected<WebCore::FileSystemHandleIdentifier, FileSystemStorageError> requestCreateHandle(IPC::Connection::UniqueID, Type, String&& name, bool createIfNecessary); >diff --git a/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp b/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp >index 67aeba5206a662c61d9b0e56d559509cb12a5025..f5556b3b60b001e041927dd4b3d38e8e708714cb 100644 >--- a/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp >+++ b/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp >@@ -226,5 +226,27 @@ void NetworkStorageManager::resolve(WebCore::FileSystemHandleIdentifier identifi > completionHandler(handle->resolve(targetIdentifier)); > } > >+void NetworkStorageManager::getHandleNames(WebCore::FileSystemHandleIdentifier identifier, CompletionHandler<void(Expected<Vector<String>, FileSystemStorageError>)>&& completionHandler) >+{ >+ ASSERT(!RunLoop::isMain()); >+ >+ auto handle = m_fileSystemStorageHandleRegistry->getHandle(identifier); >+ if (!handle) >+ return completionHandler(makeUnexpected(FileSystemStorageError::Unknown)); >+ >+ completionHandler(handle->getHandleNames()); >+} >+ >+void NetworkStorageManager::getHandle(IPC::Connection& connection, WebCore::FileSystemHandleIdentifier identifier, String&& name, CompletionHandler<void(Expected<std::pair<WebCore::FileSystemHandleIdentifier, bool>, FileSystemStorageError>)>&& completionHandler) >+{ >+ ASSERT(!RunLoop::isMain()); >+ >+ auto handle = m_fileSystemStorageHandleRegistry->getHandle(identifier); >+ if (!handle) >+ return completionHandler(makeUnexpected(FileSystemStorageError::Unknown)); >+ >+ completionHandler(handle->getHandle(connection.uniqueID(), WTFMove(name))); >+} >+ > } // namespace WebKit > >diff --git a/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h b/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h >index 1b810df78d73d2ff09e84de2ccb22ba0618011c8..042687f9f4dc476e12a1cf1ba5a7fa1ffeb4ddc7 100644 >--- a/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h >+++ b/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h >@@ -69,6 +69,8 @@ private: > void getDirectoryHandle(IPC::Connection&, WebCore::FileSystemHandleIdentifier, String&& name, bool createIfNecessary, CompletionHandler<void(Expected<WebCore::FileSystemHandleIdentifier, FileSystemStorageError>)>&&); > void removeEntry(WebCore::FileSystemHandleIdentifier, const String& name, bool deleteRecursively, CompletionHandler<void(std::optional<FileSystemStorageError>)>&&); > void resolve(WebCore::FileSystemHandleIdentifier, WebCore::FileSystemHandleIdentifier, CompletionHandler<void(Expected<Vector<String>, FileSystemStorageError>)>&&); >+ void getHandleNames(WebCore::FileSystemHandleIdentifier, CompletionHandler<void(Expected<Vector<String>, FileSystemStorageError>)>&&); >+ void getHandle(IPC::Connection&, WebCore::FileSystemHandleIdentifier, String&& name, CompletionHandler<void(Expected<std::pair<WebCore::FileSystemHandleIdentifier, bool>, FileSystemStorageError>)>&&); > > PAL::SessionID m_sessionID; > Ref<WorkQueue> m_queue; >diff --git a/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in b/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in >index 62e7403cbb700ad96bbebe0feb8205c816224ff7..8414e74abd07b2aab3dbeed3591cc76517432ac3 100644 >--- a/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in >+++ b/Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in >@@ -32,4 +32,6 @@ > GetDirectoryHandle(WebCore::FileSystemHandleIdentifier identifier, String name, bool createIfNecessary) -> (Expected<WebCore::FileSystemHandleIdentifier, WebKit::FileSystemStorageError> result) Async WantsConnection > RemoveEntry(WebCore::FileSystemHandleIdentifier identifier, String name, bool deleteRecursively) -> (std::optional<WebKit::FileSystemStorageError> result) Async > Resolve(WebCore::FileSystemHandleIdentifier identifier, WebCore::FileSystemHandleIdentifier targetIdentifier) -> (Expected<Vector<String>, WebKit::FileSystemStorageError> result) Async >+ GetHandleNames(WebCore::FileSystemHandleIdentifier identifier) -> (Expected<Vector<String>, WebKit::FileSystemStorageError> result) Async >+ GetHandle(WebCore::FileSystemHandleIdentifier identifier, String name) -> (Expected<std::pair<WebCore::FileSystemHandleIdentifier, bool>, WebKit::FileSystemStorageError> result) Async WantsConnection > } >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp >index b054c9238bdd2fcec8129b0306b53bbfb1c7df93..14561c86a6d86cfaeb8521f6fe2b6beddf9e742b 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "WebFileSystemStorageConnection.h" > >-#include "FileSystemStorageError.h" > #include "NetworkStorageManagerMessages.h" > #include <WebCore/ExceptionOr.h> > #include <WebCore/FileSystemDirectoryHandle.h> >@@ -70,9 +69,7 @@ void WebFileSystemStorageConnection::getFileHandle(WebCore::FileSystemHandleIden > return completionHandler(WebCore::Exception { convertToExceptionCode(result.error()) }); > > auto identifier = result.value(); >- if (!identifier.isValid()) >- return completionHandler(WebCore::Exception { WebCore::UnknownError, "Connection is lost"_s }); >- >+ ASSERT(identifier.isValid()); > completionHandler(WTFMove(identifier)); > }); > } >@@ -87,9 +84,7 @@ void WebFileSystemStorageConnection::getDirectoryHandle(WebCore::FileSystemHandl > return completionHandler(WebCore::Exception { convertToExceptionCode(result.error()) }); > > auto identifier = result.value(); >- if (!identifier.isValid()) >- return completionHandler(WebCore::Exception { WebCore::UnknownError, "Connection is lost"_s }); >- >+ ASSERT(identifier.isValid()); > completionHandler(WTFMove(identifier)); > }); > } >@@ -120,4 +115,30 @@ void WebFileSystemStorageConnection::resolve(WebCore::FileSystemHandleIdentifier > }); > } > >+void WebFileSystemStorageConnection::getHandleNames(FileSystemHandleIdentifier identifier, FileSystemStorageConnection::GetHandleNamesCallback&& completionHandler) >+{ >+ if (!m_connection) >+ return completionHandler(WebCore::Exception { WebCore::UnknownError, "Connection is lost" }); >+ >+ m_connection->sendWithAsyncReply(Messages::NetworkStorageManager::GetHandleNames(identifier), [completionHandler = WTFMove(completionHandler)](auto result) mutable { >+ if (!result) >+ return completionHandler(WebCore::Exception { convertToExceptionCode(result.error()) }); >+ >+ completionHandler(WTFMove(result.value())); >+ }); >+} >+ >+void WebFileSystemStorageConnection::getHandle(FileSystemHandleIdentifier identifier, const String& name, FileSystemStorageConnection::GetHandleWithTypeCallback&& completionHandler) >+{ >+ if (!m_connection) >+ return completionHandler(WebCore::Exception { WebCore::UnknownError, "Connection is lost" }); >+ >+ m_connection->sendWithAsyncReply(Messages::NetworkStorageManager::GetHandle(identifier, name), [completionHandler = WTFMove(completionHandler)](auto result) mutable { >+ if (!result) >+ return completionHandler(WebCore::Exception { convertToExceptionCode(result.error()) }); >+ >+ completionHandler(WTFMove(result.value())); >+ }); >+} >+ > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h b/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h >index b601be64353dafc777c6bce42b1e9f29139230c2..9310ea664b40d2d5d0b9c7269cf612bd492e6a88 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h >@@ -25,10 +25,34 @@ > > #pragma once > >+#include "Connection.h" >+#include "FileSystemStorageError.h" > #include <WebCore/FileSystemStorageConnection.h> > > namespace IPC { > class Connection; >+ >+template<> struct AsyncReplyError<Expected<WebCore::FileSystemHandleIdentifier, WebKit::FileSystemStorageError>> { >+ static Expected<WebCore::FileSystemHandleIdentifier, WebKit::FileSystemStorageError> create() >+ { >+ return makeUnexpected(WebKit::FileSystemStorageError::Unknown); >+ } >+}; >+ >+template<> struct AsyncReplyError<Expected<Vector<String>, WebKit::FileSystemStorageError>> { >+ static Expected<Vector<String>, WebKit::FileSystemStorageError> create() >+ { >+ return makeUnexpected(WebKit::FileSystemStorageError::Unknown); >+ } >+}; >+ >+template<> struct AsyncReplyError<Expected<std::pair<String, bool>, WebKit::FileSystemStorageError>> { >+ static Expected<std::pair<String, bool>, WebKit::FileSystemStorageError> create() >+ { >+ return makeUnexpected(WebKit::FileSystemStorageError::Unknown); >+ } >+}; >+ > } > > namespace WebCore { >@@ -53,6 +77,8 @@ private: > void getDirectoryHandle(WebCore::FileSystemHandleIdentifier, const String& name, bool createIfNecessary, WebCore::FileSystemStorageConnection::GetHandleCallback&&); > void removeEntry(WebCore::FileSystemHandleIdentifier, const String& name, bool deleteRecursively, WebCore::FileSystemStorageConnection::RemoveEntryCallback&&); > void resolve(WebCore::FileSystemHandleIdentifier, WebCore::FileSystemHandleIdentifier, WebCore::FileSystemStorageConnection::ResolveCallback&&); >+ void getHandleNames(WebCore::FileSystemHandleIdentifier, FileSystemStorageConnection::GetHandleNamesCallback&&); >+ void getHandle(WebCore::FileSystemHandleIdentifier, const String& name, FileSystemStorageConnection::GetHandleWithTypeCallback&&); > > RefPtr<IPC::Connection> m_connection; > }; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index b4b67685fcb01bb7e55eed2090af754b38904cc2..4862d62ee640f04aac07b6fb9da5ec0da48697ac 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2021-10-05 Sihui Liu <sihui_liu@apple.com> >+ >+ Add support for iterating FileSystemDirectoryHandle >+ https://bugs.webkit.org/show_bug.cgi?id=231142 >+ <rdar://problem/83848092> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * storage/filesystemaccess/directory-handle-iteration-expected.txt: Added. >+ * storage/filesystemaccess/directory-handle-iteration.html: Added. >+ * storage/filesystemaccess/resources/directory-handle-iteration.js: Added. >+ (async test): >+ > 2021-10-05 Simon Fraser <simon.fraser@apple.com> > > REGRESSION (r283335): Momentum scrolling is no longer locked to an axis >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index 7c4cf7b4a9e1a3fede4a1f057073fb0efec85ee6..1cd879ce9ae408357571065c778f9a0e8d702461 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,52 @@ >+2021-10-05 Sihui Liu <sihui_liu@apple.com> >+ >+ Add support for iterating FileSystemDirectoryHandle >+ https://bugs.webkit.org/show_bug.cgi?id=231142 >+ <rdar://problem/83848092> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Rebaselined existing tests to reflect the progress after this patch. >+ >+ * 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-create-sync-access-handle-dedicated-worker.https.tentative.window-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_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt: >+ * web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt: >+ * web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt: >+ * web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt: >+ * web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.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: >+ > 2021-10-05 Martin Robinson <mrobinson@webkit.org> > > [css-position-sticky] scrollIntoView should not take into account sticky positioning offsets >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt >index 215ab660bd04bebeb654f82f36ea1337e0b02a77..bfb8ecc9824cd7fc7a0cca408f90b1e11666986f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any-expected.txt >@@ -1,7 +1,7 @@ > >-FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt >index 215ab660bd04bebeb654f82f36ea1337e0b02a77..bfb8ecc9824cd7fc7a0cca408f90b1e11666986f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-IndexedDB.https.any.worker-expected.txt >@@ -1,7 +1,7 @@ > >-FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Store handle in IndexedDB and read from pending transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handle in IndexedDB and read from new transaction. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handles and blobs in IndexedDB. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handle in IndexedDB and read using a cursor. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Store handle in IndexedDB using inline keys. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt >index 837eae10628edf93f17568cb9230ba2cb8d335c6..5a696c4223e108c58a1b48a544ac523b0921d960 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any-expected.txt >@@ -1,10 +1,10 @@ > >-FAIL isSameEntry for identical directory handles returns true promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different directories returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different handles for the same directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for identical file handles returns true promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different files returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different handles for the same file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry comparing a file to a file in a different directory returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry comparing a file to a directory returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS isSameEntry for identical directory handles returns true >+PASS isSameEntry for different directories returns false >+PASS isSameEntry for different handles for the same directory >+FAIL isSameEntry for identical file handles returns true promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL isSameEntry for different files returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL isSameEntry for different handles for the same file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL isSameEntry comparing a file to a directory returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt >index 837eae10628edf93f17568cb9230ba2cb8d335c6..5a696c4223e108c58a1b48a544ac523b0921d960 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-isSameEntry.https.any.worker-expected.txt >@@ -1,10 +1,10 @@ > >-FAIL isSameEntry for identical directory handles returns true promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different directories returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different handles for the same directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for identical file handles returns true promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different files returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry for different handles for the same file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry comparing a file to a file in a different directory returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL isSameEntry comparing a file to a directory returns false promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS isSameEntry for identical directory handles returns true >+PASS isSameEntry for different directories returns false >+PASS isSameEntry for different handles for the same directory >+FAIL isSameEntry for identical file handles returns true promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL isSameEntry for different files returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL isSameEntry for different handles for the same file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL isSameEntry comparing a file to a directory returns false promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt >index 395eca554bdd7b8ab022ed52c92d4431dc12a3c2..266ec5348268c120db9907b4b5b0af1f8bb98d40 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-BroadcastChannel.https.window-expected.txt >@@ -1,3 +1,3 @@ > >-FAIL Send and receive messages using a broadcast channel in an iframe, dedicated worker and service worker. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Send and receive messages using a broadcast channel in an iframe, dedicated worker and service worker. assert_equals: The message target must receive a "broadcast-channel-created" message response. expected (string) "broadcast-channel-created" but got (undefined) undefined > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt >index 4b1c5be3b77d8f7b63046f9a0a12dea6c4828815..67f24ed41849220fab996ca34aa1ea7ce8e79949 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-Error.https.window-expected.txt >@@ -1,12 +1,12 @@ > >-FAIL Fail to send and receive messages using a cross origin iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send and receive messages using a cross origin message port in an iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send to a sandboxed iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send messages using a message port to a sandboxed iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send messages to a data URI iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send messages using a message port in a data URI iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send and receive messages using a cross origin window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send and receive messages using a cross origin message port in a window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send messages to a sandboxed window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Fail to send messages using a message port to a sandboxed window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Fail to send and receive messages using a cross origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL Fail to send to a sandboxed iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL Fail to send messages to a data URI iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL Fail to send and receive messages using a cross origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL Fail to send messages to a sandboxed window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt >index 821c61c9f4f1ea4fb15ce111d9fc2f706a0bbc4e..d170ae49367b4a5ff555d8212c1ca8edebd5ca91 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-frames.https.window-expected.txt >@@ -1,6 +1,6 @@ > >-FAIL Send and receive messages using a message port in a same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a message port in a sandboxed same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a message port in a blob iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a message port in an iframe srcdoc. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+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" >+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" >+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" >+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" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt >index a93847d0035b3bf7eab559e048045d06cb06b580..83f982b8d5d253aea5360ac92b18bc375b26f0c6 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-windows.https.window-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL Send and receive messages using a message port in a same origin window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a message port in a blob window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a message port in a sandboxed same origin window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+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" >+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" >+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" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt >index 81f6f6107f4affa19c388ee1cc8d04b1a3d84edf..0b705dbc853a8649b5a3dc3ed8d8e97dece31466 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-MessagePort-workers.https.window-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL Send and receive messages using a message port in a dedicated worker. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a message port in a service worker. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a message port in a shared worker. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+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" >+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" >+FAIL 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')" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt >index 3ce9e83220edd2bbfa746d4ceb294d670a7d5c5e..9de9a3f625b9533ca7ff01e1ef086b97c966d369 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-frames.https.window-expected.txt >@@ -1,6 +1,6 @@ > >-FAIL Send and receive messages using a same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a sandboxed same origin iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a blob iframe. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using an iframe srcdoc. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Send and receive messages using a same origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Send and receive messages using a sandboxed same origin iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Send and receive messages using a blob iframe. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Send and receive messages using an iframe srcdoc. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt >index 6d9626584198be90781efc97b1d0fdc8fb1f8a86..da0115d7d9e5af04c48c584f7fe2c641273250dc 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-windows.https.window-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL Send and receive messages using a same origin window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a blob window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a sandboxed same origin window. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Send and receive messages using a same origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Send and receive messages using a blob window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Send and receive messages using a sandboxed same origin window. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt >index 24b46dd59aca07904fd67b9911f70706ad9a24bd..6dd2ffb8b266be15dd4cc3f125a0b2f703a1ea60 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-postMessage-workers.https.window-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL Send and receive messages using a dedicated worker. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a service worker. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Send and receive messages using a shared worker. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Send and receive messages using a dedicated worker. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Send and receive messages using a service worker. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL 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')" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt >index 7e661ce0f7934f693d26f3917e076840e71cdf9c..aed147d1cbf1b25e7ec50f7434bd3c35f6a1dbb0 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any-expected.txt >@@ -1,9 +1,9 @@ > >-FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on an already removed directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL 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)" >+FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt >index 7e661ce0f7934f693d26f3917e076840e71cdf9c..aed147d1cbf1b25e7ec50f7434bd3c35f6a1dbb0 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemBaseHandle-remove.https.any.worker-expected.txt >@@ -1,9 +1,9 @@ > >-FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on an already removed directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL remove() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL 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)" >+FAIL remove() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL remove() on a file should ignore the recursive option promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt >index 78171ff0e4878eb489901509ceb4583d857a6688..7a976ab9a8fa3f68a9eda548b39df353705b6486 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt >@@ -1,12 +1,20 @@ > >-FAIL getDirectoryHandle(create=false) rejects for non-existing directories promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=true) creates an empty directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=false) returns existing directories promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=true) returns existing directories without erasing promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() when a file already exists with the same name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() with empty name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() with "." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() with ".." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=false) with a path separator when the directory exists promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=true) with a path separator promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS getDirectoryHandle(create=false) rejects for non-existing directories >+FAIL getDirectoryHandle(create=true) creates an empty directory promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...entry of handle...')" >+FAIL getDirectoryHandle(create=false) returns existing directories promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+PASS getDirectoryHandle(create=true) returns existing directories without erasing >+FAIL getDirectoryHandle() when a file already exists with the same name promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getDirectoryHandle() with empty name assert_unreached: Should have rejected: undefined Reached unreachable code >+FAIL getDirectoryHandle() with "." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getDirectoryHandle() with ".." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getDirectoryHandle(create=false) with a path separator when the directory exists promise_rejects_js: getDirectoryHandle() must reject names containing "/" 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() { >+ [native code] >+}" ("TypeError") >+FAIL getDirectoryHandle(create=true) with a path separator promise_rejects_js: getDirectoryHandle(true) must reject names containing "/" 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() { >+ [native code] >+}" ("TypeError") > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt >index 78171ff0e4878eb489901509ceb4583d857a6688..7a976ab9a8fa3f68a9eda548b39df353705b6486 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt >@@ -1,12 +1,20 @@ > >-FAIL getDirectoryHandle(create=false) rejects for non-existing directories promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=true) creates an empty directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=false) returns existing directories promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=true) returns existing directories without erasing promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() when a file already exists with the same name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() with empty name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() with "." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle() with ".." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=false) with a path separator when the directory exists promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getDirectoryHandle(create=true) with a path separator promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS getDirectoryHandle(create=false) rejects for non-existing directories >+FAIL getDirectoryHandle(create=true) creates an empty directory promise_test: Unhandled rejection with value: object "TypeError: undefined is not a function (near '...entry of handle...')" >+FAIL getDirectoryHandle(create=false) returns existing directories promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+PASS getDirectoryHandle(create=true) returns existing directories without erasing >+FAIL getDirectoryHandle() when a file already exists with the same name promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getDirectoryHandle() with empty name assert_unreached: Should have rejected: undefined Reached unreachable code >+FAIL getDirectoryHandle() with "." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getDirectoryHandle() with ".." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getDirectoryHandle(create=false) with a path separator when the directory exists promise_rejects_js: getDirectoryHandle() must reject names containing "/" 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() { >+ [native code] >+}" ("TypeError") >+FAIL getDirectoryHandle(create=true) with a path separator promise_rejects_js: getDirectoryHandle(true) must reject names containing "/" 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() { >+ [native code] >+}" ("TypeError") > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt >index ae55d134d27425e07ca1c86fa67a6fd4ce87f54e..99ec93afb8202e13ad817213e1e2a2cbd791b1df 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt >@@ -1,13 +1,19 @@ > >-FAIL getFileHandle(create=false) rejects for non-existing files promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) creates an empty file for non-existing files promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=false) when a directory already exists with the same name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) when a directory already exists with the same name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle() with empty name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle() with "." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle() with ".." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=false) with a path separator when the file exists. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) with a path separator promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS getFileHandle(create=false) rejects for non-existing files >+FAIL getFileHandle(create=true) creates an empty file for non-existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL 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 >+FAIL 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 >+PASS getFileHandle() with empty name >+FAIL getFileHandle() with "." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getFileHandle() with ".." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getFileHandle(create=false) with a path separator when the file exists. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFileHandle(create=true) with a path separator promise_rejects_js: getFileHandle(create=true) must reject names containing "/" 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() { >+ [native code] >+}" ("TypeError") > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt >index ae55d134d27425e07ca1c86fa67a6fd4ce87f54e..99ec93afb8202e13ad817213e1e2a2cbd791b1df 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt >@@ -1,13 +1,19 @@ > >-FAIL getFileHandle(create=false) rejects for non-existing files promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) creates an empty file for non-existing files promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=false) when a directory already exists with the same name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) when a directory already exists with the same name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle() with empty name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle() with "." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle() with ".." name promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=false) with a path separator when the file exists. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFileHandle(create=true) with a path separator promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS getFileHandle(create=false) rejects for non-existing files >+FAIL getFileHandle(create=true) creates an empty file for non-existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFileHandle(create=false) returns existing files promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFileHandle(create=true) returns existing files without erasing promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL 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 >+FAIL 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 >+PASS getFileHandle() with empty name >+FAIL getFileHandle() with "." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getFileHandle() with ".." name 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() { >+ [native code] >+}" ("TypeError") >+FAIL getFileHandle(create=false) with a path separator when the file exists. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFileHandle(create=true) with a path separator promise_rejects_js: getFileHandle(create=true) must reject names containing "/" 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() { >+ [native code] >+}" ("TypeError") > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt >index fe1ffa9c45bf78918c68bd81229d72ee0306a4c5..e808c05ebb28915d7678b4183b9fbd4777b067b2 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any-expected.txt >@@ -1,8 +1,8 @@ > >-FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL values: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL values: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt >index fe1ffa9c45bf78918c68bd81229d72ee0306a4c5..e808c05ebb28915d7678b4183b9fbd4777b067b2 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-iteration.https.any.worker-expected.txt >@@ -1,8 +1,8 @@ > >-FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL values: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL returning early from an iteration doesn't crash promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL @@asyncIterator: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL entries: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL values: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL keys: full iteration works promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL iteration while iterator gets garbage collected promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt >index 28147225bda84928dc326764100a49ffda2bc018..c59680586da99d1a7051fa61cb9d7c16bf6ca736 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt >@@ -1,11 +1,15 @@ > >-FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with empty name should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with "." name should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with ".." name should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with a path separator should fail. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() with empty name should fail assert_unreached: Should have rejected: undefined Reached unreachable code >+FAIL 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() { >+ [native code] >+}" ("TypeError") >+FAIL 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() { >+ [native code] >+}" ("TypeError") >+FAIL removeEntry() with a path separator should fail. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt >index 28147225bda84928dc326764100a49ffda2bc018..c59680586da99d1a7051fa61cb9d7c16bf6ca736 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt >@@ -1,11 +1,15 @@ > >-FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with empty name should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with "." name should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with ".." name should fail promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL removeEntry() with a path separator should fail. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL removeEntry() to remove a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() on an already removed file should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() to remove an empty directory promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() on a non-empty directory should fail promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() on a directory recursively should delete all sub-items promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL removeEntry() with empty name should fail assert_unreached: Should have rejected: undefined Reached unreachable code >+FAIL 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() { >+ [native code] >+}" ("TypeError") >+FAIL 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() { >+ [native code] >+}" ("TypeError") >+FAIL removeEntry() with a path separator should fail. promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt >index f5e651b1ef1c7f1195c6a57a072736422713c261..893738024d7c6a2cc43b9f3be858a076fdffbb80 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any-expected.txt >@@ -1,6 +1,6 @@ > >-FAIL Resolve returns empty array for same directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Resolve returns correct path promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Resolve returns correct path with non-ascii characters promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Resolve returns null when entry is not a child promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS Resolve returns empty array for same directory >+FAIL Resolve returns correct path promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Resolve returns correct path with non-ascii characters promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Resolve returns null when entry is not a child promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt >index f5e651b1ef1c7f1195c6a57a072736422713c261..893738024d7c6a2cc43b9f3be858a076fdffbb80 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-resolve.https.any.worker-expected.txt >@@ -1,6 +1,6 @@ > >-FAIL Resolve returns empty array for same directory promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Resolve returns correct path promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Resolve returns correct path with non-ascii characters promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Resolve returns null when entry is not a child promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+PASS Resolve returns empty array for same directory >+FAIL Resolve returns correct path promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Resolve returns correct path with non-ascii characters promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL Resolve returns null when entry is not a child promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window-expected.txt >index 3b8c0d8dab0180e923c44397f641c65dcae7fd92..b7d4eb277ba7bf3fdc1ff992a901a8d34dea7e9d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-create-sync-access-handle-dedicated-worker.https.tentative.window-expected.txt >@@ -1,3 +1,3 @@ > >-FAIL Attempt to create a sync access handle. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Attempt to create a sync access handle. promise_test: Unhandled rejection with value: object "DataCloneError: The object can not be cloned." > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt >index f7c17073aeeff9aaf0b728ccbe2ab8e1dd61a578..e46a572bf0f56e2cd4b9979085e10094f9f42610 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any-expected.txt >@@ -1,4 +1,4 @@ > >-FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt >index f7c17073aeeff9aaf0b728ccbe2ab8e1dd61a578..e46a572bf0f56e2cd4b9979085e10094f9f42610 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemFileHandle-getFile.https.any.worker-expected.txt >@@ -1,4 +1,4 @@ > >-FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL getFile() provides a file that can be sliced promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL getFile() returns last modified time promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt >index 74b38276489b267b4f8c0be75eef167874856bbf..2b09ae8e9cfdd0ad20dd8b669c0602a941435e8a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt >@@ -1,14 +1,14 @@ > >-FAIL SyncAccessHandle.close is idempotent promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.close is idempotent when called immediately promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.read fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.read fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.write fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.write fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.flush fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.flush fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.getSize fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.getSize fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.truncate fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.truncate fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL SyncAccessHandle.close is idempotent promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.close is idempotent when called immediately promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.read fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.read fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.write fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.write fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.flush fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.flush fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.getSize fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.getSize fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.truncate fails after SyncAccessHandle.close settles promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.truncate fails immediately after calling SyncAccessHandle.close promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt >index e622a6f8b994cdba6e3dfd0da24fe6c3e57894f7..1381aafb8a272c15b57351c399fc414ddb96a3c3 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt >@@ -1,6 +1,6 @@ > >-FAIL Test flush on an empty file. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.read returns bytes written by SyncAccessHandle.write after SyncAccessHandle.flush promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.read fails when there is a pending SyncAccessHandle.flush promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL SyncAccessHandle.write fails when there is a pending SyncAccessHandle.flush promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Test flush on an empty file. promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.read returns bytes written by SyncAccessHandle.write after SyncAccessHandle.flush promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.read fails when there is a pending SyncAccessHandle.flush promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL SyncAccessHandle.write fails when there is a pending SyncAccessHandle.flush promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt >index 8d08a3f15788f485f2afdc4f3e735f4e659fea61..0f5a4f8e7ef2045db6ca3cd3c4946462606a068f 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt >@@ -1,4 +1,4 @@ > >-FAIL test SyncAccessHandle.getSize after SyncAccessHandle.write promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL test createSyncAccessHandle.getSize with pending operation promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL test SyncAccessHandle.getSize after SyncAccessHandle.write promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL test createSyncAccessHandle.getSize with pending operation promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt >index 6bde4fa99369de13e83e0ee218012f0a56392f35..ca58f080a8f32ad37b191da2b6d8d61380e1cf1d 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-read-write.https.tentative.worker-expected.txt >@@ -1,10 +1,10 @@ > >-FAIL Test reading an empty file through a sync access handle. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Test writing and reading through a sync access handle. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Test second write that is bigger than the first write promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Test second write that is smaller than the first write promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Test initial write with an offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Test overwriting the file at an offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Test read at an offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL Test reading at a negative offset fails. promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL Test reading an empty file through a sync access handle. promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL Test writing and reading through a sync access handle. promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL Test second write that is bigger than the first write promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL Test second write that is smaller than the first write promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL Test initial write with an offset promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL Test overwriting the file at an offset promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL Test read at an offset promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL Test reading at a negative offset fails. promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt >index 54c5a5b2ef873e066f25ba78c10a910160f45538..117aaba47bfb9b1e056ceda8a42402a7f9cbe264 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt >@@ -1,5 +1,5 @@ > >-FAIL test createSyncAccessHandle.truncate with pending operation promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL test SyncAccessHandle.truncate with different sizes promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL test SyncAccessHandle.truncate after SyncAccessHandle.write promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL test createSyncAccessHandle.truncate with pending operation promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL test SyncAccessHandle.truncate with different sizes promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" >+FAIL test SyncAccessHandle.truncate after SyncAccessHandle.write promise_test: Unhandled rejection with value: object "TypeError: fileHandle.createSyncAccessHandle is not a function. (In 'fileHandle.createSyncAccessHandle()', 'fileHandle.createSyncAccessHandle' is undefined)" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt >index d1526c599586625f316a76798f701748b846fee0..2932cef7f40306763921e3a20fd77b56948dcfcf 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any-expected.txt >@@ -1,10 +1,10 @@ > >-FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL plays well with fetch promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL abort() aborts write promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL plays well with fetch promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL abort() aborts write promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt >index d1526c599586625f316a76798f701748b846fee0..2932cef7f40306763921e3a20fd77b56948dcfcf 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-piped.https.any.worker-expected.txt >@@ -1,10 +1,10 @@ > >-FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL plays well with fetch promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL abort() aborts write promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL can be piped to with a string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with an ArrayBuffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with a Blob promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with a param object with write command promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL can be piped to with a param object with multiple commands promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL multiple operations can be queued promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL plays well with fetch promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL abort() aborts write promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt >index 37f7a64ae9a5f01ddd87f4acda879a54b66648e8..3a78ffb111a472704eddf528e3ab9f745276bd8a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any-expected.txt >@@ -1,31 +1,31 @@ > >-FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: writable file stream persists file on close, even if file is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt >index 37f7a64ae9a5f01ddd87f4acda879a54b66648e8..3a78ffb111a472704eddf528e3ab9f745276bd8a 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker-expected.txt >@@ -1,31 +1,31 @@ > >-FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL atomic writes: writable file stream persists file on close, even if file is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL write() with an empty blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() a blob to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with WriteParams without position to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() a string to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() a blob to an empty file with zero offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called consecutively appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() WriteParams without position and string appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() WriteParams without position and blob appends promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called with a string and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called with a blob and a valid offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() called with an offset beyond the end of the file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with an empty string to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a valid utf-8 string promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a string with unix line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a string with windows line ending preserved promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with an empty array buffer to an empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with a valid typed array buffer promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: close() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: writable file streams make atomic changes on close promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: write() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: truncate() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: close() after close() fails promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL atomic writes: only one close() operation may succeed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+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" >+FAIL getWriter() can be used promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL WriteParams: truncate missing size param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL WriteParams: write missing data param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL WriteParams: seek missing position param promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() with an invalid blob to an empty file should reject promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt >index e3851fca33e4c9d8396191b6d1dbaeacf0da3894..acec5f9115a1949075367946618e89e31977928e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any-expected.txt >@@ -1,12 +1,12 @@ > >-FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt >index e3851fca33e4c9d8396191b6d1dbaeacf0da3894..acec5f9115a1949075367946618e89e31977928e 100644 >--- a/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt >+++ b/LayoutTests/imported/w3c/web-platform-tests/file-system-access/sandboxed_FileSystemWritableFileStream.https.any.worker-expected.txt >@@ -1,12 +1,12 @@ > >-FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >-FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "TypeError: dir.values is not a function. (In 'dir.values()', 'dir.values' is undefined)" >+FAIL truncate() to shrink a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL truncate() to grow a file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL createWritable() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL write() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL truncate() fails when parent directory is removed promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL createWritable({keepExistingData: true}): atomic writable file stream initialized with source contents promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL createWritable({keepExistingData: false}): atomic writable file stream initialized with empty file promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL cursor position: truncate size > offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL cursor position: truncate size < offset promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" >+FAIL commands are queued, stream is unlocked after each operation promise_test: Unhandled rejection with value: object "NotSupportedError: getFile is not implemented" > >diff --git a/LayoutTests/storage/filesystemaccess/directory-handle-iteration-expected.txt b/LayoutTests/storage/filesystemaccess/directory-handle-iteration-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..76020536b1d3615cddadffc05590a1356203ae15 >--- /dev/null >+++ b/LayoutTests/storage/filesystemaccess/directory-handle-iteration-expected.txt >@@ -0,0 +1,21 @@ >+This test checks iteration on FileSystemDirectoryHandle. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+Test keys(): >+PASS resultKeys.length is handleNames.length >+PASS resultKeys is handleNames >+Test values(): >+PASS resultValuesName.length is handleNames.length >+PASS resultValuesName is handleNames >+PASS resultValuesType is handleTypes >+Test entries(): >+PASS resultKeys.length is handleNames.length >+PASS resultKeys is handleNames >+PASS resultValuesName is handleNames >+PASS resultValuesType is handleTypes >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/storage/filesystemaccess/directory-handle-iteration.html b/LayoutTests/storage/filesystemaccess/directory-handle-iteration.html >new file mode 100644 >index 0000000000000000000000000000000000000000..bb90559377715bbe62baead06950c9c8c028ef90 >--- /dev/null >+++ b/LayoutTests/storage/filesystemaccess/directory-handle-iteration.html >@@ -0,0 +1,16 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<script src="../../resources/js-test.js"></script> >+</head> >+<body> >+<script> >+var jsTestIsAsync = true; >+ >+if (!window.testRunner) { >+ finishTest("window.testRunner is not available"); >+} >+</script> >+<script src="resources/directory-handle-iteration.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/storage/filesystemaccess/resources/directory-handle-iteration.js b/LayoutTests/storage/filesystemaccess/resources/directory-handle-iteration.js >new file mode 100644 >index 0000000000000000000000000000000000000000..b61a60bb76e651f66e8a7e2bd6b73bc698678b6e >--- /dev/null >+++ b/LayoutTests/storage/filesystemaccess/resources/directory-handle-iteration.js >@@ -0,0 +1,91 @@ >+if (this.importScripts) { >+ importScripts('../../../resources/js-test.js'); >+} >+ >+description("This test checks iteration on FileSystemDirectoryHandle."); >+ >+const handleTypes = ["directory", "directory", "file", "file"]; >+const handleNames = ["dir1", "dir2", "file1", "file2"]; >+var resultKeys, resultValuesName, resultValuesType, resultEntries, index; >+var handles = []; >+ >+function finishTest(error) >+{ >+ if (error) { >+ testFailed(error); >+ } >+ finishJSTest(); >+} >+ >+async function test() >+{ >+ try { >+ // Create a new directory for this test. >+ var originHandle = await navigator.storage.getDirectory(); >+ await originHandle.removeEntry("directory-handle-iteration", { "recursive" : true }).then(()=>{ }, ()=> { }); >+ var rootHandle = await originHandle.getDirectoryHandle("directory-handle-iteration", { "create" : true }); >+ >+ for (let i = 0; i < handleNames.length; i++) { >+ if (handleTypes[i] == "directory") { >+ handle = await rootHandle.getDirectoryHandle(handleNames[i], { "create" : true }); >+ handles.push(handle); >+ } else { >+ handle = await rootHandle.getFileHandle(handleNames[i], { "create" : true }); >+ handles.push(handle); >+ } >+ } >+ >+ debug("Test keys():") >+ var keys = []; >+ for await (key of rootHandle.keys()) { >+ keys.push(key); >+ } >+ keys.sort((a, b) => (a > b) ? 1 : -1); >+ resultKeys = keys; >+ shouldBe("resultKeys.length", "handleNames.length"); >+ shouldBe("resultKeys", "handleNames"); >+ >+ debug("Test values():") >+ var values = []; >+ for await (value of rootHandle.values()) { >+ values.push(value); >+ } >+ values.sort((a, b) => (a.name > b.name) ? 1 : -1); >+ var valuesName = [], valuesType = []; >+ values.forEach(value => { >+ valuesName.push(value.name); >+ valuesType.push(value.kind); >+ }); >+ resultValuesName = valuesName; >+ resultValuesType = valuesType; >+ shouldBe("resultValuesName.length", "handleNames.length"); >+ shouldBe("resultValuesName", "handleNames"); >+ shouldBe("resultValuesType", "handleTypes"); >+ >+ debug("Test entries():") >+ var entries = []; >+ for await (entry of rootHandle.entries()) { >+ entries.push(entry); >+ } >+ entries.sort((a, b) => (a[0] > b[0]) ? 1 : -1); >+ var entriesKey = [], entriesValueName = [], entriesValueType = []; >+ entries.forEach(entry => { >+ entriesKey.push(entry[0]); >+ entriesValueName.push(entry[1].name); >+ entriesValueType.push(entry[1].kind); >+ }); >+ resultKeys = entriesKey; >+ resultValuesName = entriesValueName; >+ resultValuesType = entriesValueType; >+ shouldBe("resultKeys.length", "handleNames.length"); >+ shouldBe("resultKeys", "handleNames"); >+ shouldBe("resultValuesName", "handleNames"); >+ shouldBe("resultValuesType", "handleTypes"); >+ >+ finishTest(); >+ } catch (error) { >+ finishTest(error); >+ } >+} >+ >+test();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 231142
:
440013
|
440161
|
440163
|
440167
|
440170
|
440174
|
440192
|
440194
|
440220
|
440225
|
440228
|
440231
|
440246
|
440247
|
440249
|
440254
|
440277
|
440278
|
440468
|
440478
|
440484
|
440518
|
440535
|
440571
|
440648
|
440741