Skip to content

test: ignore security warnings in the iframe external protocol spec - #54060

Merged
MarshallOfSound merged 1 commit into
mainfrom
claude/project-thread-xdckwk
Sep 18, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
claude/project-thread-xdckwk

Conversation

@claude

@claude claude Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Description of Change

Before: iframe sandbox external protocols > blocks navigation to external protocol from a sandboxed iframe asserted on the first console-message the page logged. Since the renderer security warnings moved to C++ in #53970, the main frame logs an "Electron Security Warning (Insecure Content-Security-Policy)" message when it finishes loading (the fixture page has no CSP), and on the Windows runners that regularly arrives before the "Navigation to external protocol blocked by sandbox" message the test wants. It failed twice and passed on the third retry in #53970's own windows-x64 / test (win, 2) job, and failed all four attempts on #53838.

After: the spec waits for the first console message that is not a security warning, so the order of the two messages no longer matters. The assertions are unchanged.

How: swap once(w.webContents, 'console-message') for emittedUntil(...) from spec/lib/events-helpers with a predicate that skips messages starting with "Electron Security Warning", the same approach #53970 took for the <webview> console-message helper.

Verified with oxlint on the changed file; the behavior change itself is only observable on CI, where the Windows shards should stop flaking on this spec.

Checklist

Release Notes

Notes: none


Generated by Claude Code

…col spec

The spec asserted on the first console message the page logged. Since the
renderer security warnings moved to C++ (#53970) the main frame logs an
"Electron Security Warning (Insecure Content-Security-Policy)" message when
it finishes loading, and on Windows that regularly lands before the
"Navigation to external protocol blocked by sandbox" message the test is
waiting for. Wait for the first message that is not a security warning
instead.
@MarshallOfSound MarshallOfSound added target/45-x-y PR should also be added to the "45-x-y" branch. fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases labels Sep 18, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 18, 2026 00:57
@MarshallOfSound

Copy link
Copy Markdown
Member

(Looks like one of my recent PRs introduced a test flake due to a timing change in security warnings)

@MarshallOfSound
MarshallOfSound merged commit 9aced3c into main Sep 18, 2026
91 checks passed
@MarshallOfSound
MarshallOfSound deleted the claude/project-thread-xdckwk branch September 18, 2026 02:30
@release-clerk

release-clerk Bot commented Sep 18, 2026

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54064

@trop trop Bot added in-flight/45-x-y merged/45-x-y PR was merged to the "45-x-y" branch. and removed target/45-x-y PR should also be added to the "45-x-y" branch. in-flight/45-x-y labels Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases merged/45-x-y PR was merged to the "45-x-y" branch. semver/none

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants