ckerr

#53956: test: gate specs on testing bindings

Merged
Created: Sep 15, 2026, 12:20:10 PM
Merged: Sep 15, 2026, 4:09:27 PM
5 comments
Target: main

Description of Change

Add code to the specs to warn loudly if we try to run specs that require testing builds against release binaries of Electron.

The internalContextBridge test exposure and command-line fuse overrides depend on DCHECK_IS_ON(), as does electron_common_testing. Gate those suites with the existing testing-binding helper while retaining public context-bridge coverage. Allow callers to set ELECTRON_REQUIRE_TESTING_BINDINGS=1 to fail early if expected testing hooks are missing, preventing silent coverage loss in testing jobs. CI wiring for this opt-in flag is separate.

Validation

  • Focused Node checks passed for suite selection with/without testing bindings and all six combinations of binding availability and the expectation flag (unset, 0, 1).
  • Scoped oxlint, formatting, syntax, and whitespace checks passed.
  • The exact patch applies cleanly to 45-x-y, 44-x-y, 43-x-y, and 42-x-y; all have the required helpers.
  • Native Electron builds and the full spec suite were not run.

Checklist

Release Notes

Notes: none

Backports

42-x-y
Merged
PR Number
#53965
Merged At
Sep 15, 2026, 5:57:32 PM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#53966
Merged At
Sep 15, 2026, 5:14:30 PM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#53964
Merged At
Sep 15, 2026, 5:06:02 PM
Released In
v44.4.1
Release Date
Sep 15, 2026, 5:58:49 PM
45-x-y
Merged
PR Number
#53967
Merged At
Sep 15, 2026, 5:19:57 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