Skip to content

Commit

Permalink
Bug 1830580 [wpt PR 39755] - FSA: Relax file name checks in the Bucke…
Browse files Browse the repository at this point in the history
…tFS, a=testonly

Automatic update from web-platform-tests
FSA: Relax file name checks in the BucketFS

Unlike when saving files to the local file system, the names of files in
the the Bucket File System (a.k.a. OPFS) are obfuscated before they end
up on disk - if they even end up on disk at all.

As such, we don't need to perform the same name sanitization and
obfuscation for these files as we do for files that end up on the
user-visible file system.

See whatwg/fs#93 for context

Bug: 1399536
Change-Id: I019b393b731cd20aa4c45eade4eca19b6633e9cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4492076
Reviewed-by: Daseul Lee <dsleechromium.org>
Commit-Queue: Austin Sullivan <asullychromium.org>
Cr-Commit-Position: refs/heads/main{#1206676}

--

wpt-commits: e4c1bdf27a01716a605a70e171be797f560952bf
wpt-pr: 39755

UltraBlame original commit: 364abd441d742e0bc35abe26540b3d46125d8752
  • Loading branch information
marco-c committed Oct 30, 2023
1 parent ceec695 commit 4381300
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 154 deletions.
44 changes: 12 additions & 32 deletions testing/web-platform/tests/fs/resources/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,28 +127,9 @@ in
hierarchical
paths
.
let
kPathSeparators
;
if
(
navigator
.
userAgent
.
includes
(
'
Windows
NT
'
)
)
{
/
/
Windows
uses
Consider
both
'
/
Expand All @@ -160,7 +141,18 @@ and
as
path
separators
to
ensure
file
names
are
/
/
platform
-
agnostic
.
let
kPathSeparators
=
[
Expand All @@ -173,18 +165,6 @@ kPathSeparators
'
]
;
}
else
{
kPathSeparators
=
[
'
/
'
]
;
}
async
function
getFileSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,24 +522,6 @@ root
>
{
const
dir
=
await
root
.
getDirectoryHandle
(
'
dir
'
{
create
:
true
}
)
;
const
handle
=
await
Expand All @@ -554,7 +536,7 @@ before
'
foo
'
dir
root
)
;
await
Expand All @@ -567,109 +549,11 @@ handle
move
(
'
Lorem
.
'
)
)
;
assert_array_equals
(
await
getSortedDirectoryEntries
(
root
)
[
'
dir
test
/
test
'
]
)
;
assert_array_equals
(
await
getSortedDirectoryEntries
(
dir
)
[
'
file
-
before
'
]
)
;
assert_equals
(
await
getFileContents
(
handle
)
'
foo
'
)
;
assert_equals
(
await
getFileSize
(
handle
)
3
)
;
}
'
move
(
name
)
with
a
name
with
a
trailing
period
should
fail
'
)
;
directory_test
(
async
(
t
root
)
=
>
{
const
handle
=
await
createFileWithContents
(
t
'
file
-
before
'
'
foo
'
root
)
;
await
Expand All @@ -683,7 +567,8 @@ move
(
'
test
/
\
\
test
'
)
Expand Down Expand Up @@ -737,8 +622,8 @@ with
a
name
with
invalid
characters
path
separators
should
fail
'
Expand Down

0 comments on commit 4381300

Please sign in to comment.