ckerr

#54951: test: serve a checked-in file in the no-cors registerFileProtocol spec

Merged
Created: Oct 14, 2026, 5:12:07 PM
Merged: Oct 14, 2026, 7:55:45 PM
5 comments
Target: main

Description of Change

The spec returns an opaque response for a registerFileProtocol scheme fetched cross-origin with mode: no-cors wrote a temporary file for its handler to serve. Right after the fetch, it removed the directory with fs.rmSync.

On Windows CI that removal failed with ENOTEMPTY on both tries that reached it:

  • Another handle still had the file open with FILE_SHARE_DELETE.
  • Electron builds Node's fs.rmSync against libc++, whose Windows std::filesystem deletes without POSIX semantics.
  • So the file stayed in the directory, pending deletion, and the directory could not be removed.

The test only needs a file whose body the opaque response must hide. It now serves the existing spec/fixtures/hello.txt, so there is nothing to delete. The assertions are unchanged: type opaque, status 0, and an empty body.

On 42-x-y and 43-x-y this test is the only user of os in the file, so those backports also need the now-unused import * as os from 'node:os'; removed.

🤖 Generated with Claude Code

Checklist

Release Notes

Notes: none

Backports

42-x-y
Merged
PR Number
#54971
Merged At
Oct 15, 2026, 1:14:37 AM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#54972
Merged At
Oct 15, 2026, 1:14:31 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54973
Merged At
Oct 14, 2026, 9:16:38 PM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#54975
Merged At
Oct 14, 2026, 9:29:02 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron