#54039: test: re-enable missing-file load failure
Merged
Description of Change
Re-enable the missing-file did-fail-load test.
The old file://a.txt URL names a host, not a local file. The test was disabled in Chromium roll #21000 (49b47ee) when navigation reported ERR_FAILED instead of ERR_FILE_NOT_FOUND. The historical failure has not been reproduced.
Use pathToFileURL for a nonexistent file in a fresh temporary directory. Await the rejected load and event together, and assert the exact error, requested URL, and main-frame flag.
Validation:
- Focused lint and formatting passed.
- The target and existing-file control passed in three independent Xvfb/X11 runs without retries, using the existing Electron
v46.0.0-nightly.20260917binary. - Native Windows validation and the full test suite were not run.
Checklist
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
-
npm testpasses - tests are changed or added
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, past tense, and no longer than 80 characters.
Release Notes
Notes: none
Backports
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