Closed Bug 2089372 Opened 21 days ago Closed 12 days ago

[wpt-sync] Sync PR 64358 - script: Implement readEntries() state machine + Chromium style batching

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64358 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64358
Details from upstream follow.

Euclid Ye <yezhizhenjiakang@gmail.com> wrote:

script: Implement readEntries() state machine + Chromium style batching

  1. This implements state machine for readEntries: the motivation is to
  • fail consecutive readEntries calls before the previous async callback is run
  • Run error callback when reading fails
  1. This adds 100 batching size like Chromium. It was baffling for me why spec here was "unnecessarily complicated", until I found this on MDN:

In Chromium-based browsers, readEntries() will only return the first 100 FileSystemEntry instances. In order to obtain all of the instances, readEntries() must be called multiple times.

Testing: This adds an automated tests, with helpers to reduce duplication from previous two exported tests.
Part of #<!-- nolink -->45653

Reviewed in servo/servo#49417

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 4 tests and 3 subtests

Status Summary

Firefox

OK : 3[GitHub] 4[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 7[GitHub] 75[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 2

Chrome

OK : 3
PASS: 1
FAIL: 8

Safari

OK : 3
PASS: 6
FAIL: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.