Files
tubestation/testing/web-platform/tests/fs/root-name.https.any.js
Austin Sullivan 640bca29a8 Bug 1826908 [wpt PR 39423] - fsa: Add WPT confirming the name of the OPFS root is the empty string, a=testonly
Automatic update from web-platform-tests
fsa: Add WPT confirming the name of the OPFS root is the empty string

See step 3.2 of this algorithm in the spec:
https://fs.spec.whatwg.org/#dom-storagemanager-getdirectory

No Chromium bug for this, but I filed a bug against Firefox since they
currently return a handle whose name is "root"

https://bugzilla.mozilla.org/show_bug.cgi?id=1826886

Change-Id: Ie160ac6571cd287629893239e1df1d97c35b5d40
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4408007
Auto-Submit: Austin Sullivan <asully@chromium.org>
Reviewed-by: Daseul Lee <dslee@chromium.org>
Commit-Queue: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1127619}

--

wpt-commits: 207000622f829d4571e98db851639aebbaea1b48
wpt-pr: 39423
2023-04-14 11:16:14 +00:00

7 lines
200 B
JavaScript

'use strict';
promise_test(async test => {
let root = await navigator.storage.getDirectory();
assert_equals(root.name, '');
}, 'getDirectory returns a directory whose name is the empty string');