WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311709
Fix flaky test http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem.html
https://bugs.webkit.org/show_bug.cgi?id=311709
Summary
Fix flaky test http/tests/security/contentSecurityPolicy/script-src-strict-dy...
roberto_rodriguez2
Reported
2026-04-07 23:50:13 PDT
Layout test http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem.html creates a Worker whose script calls importScripts("post-message.js") followed by its own postMessage("importScripts allowed"). Since post-message.js also calls postMessage("importScripts allowed"), two identical messages are sent. The test only expected one, creating a race between notifyDone() and the second message's delivery. This became flaky after
292030@main
moved alert output from the injected bundle (which had an isTestRunning() guard) to the UIProcess. Fix by waiting for both messages before calling notifyDone() and expecting both alerts.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-04-07 23:50:19 PDT
<
rdar://problem/174297450
>
roberto_rodriguez2
Comment 2
2026-04-07 23:54:08 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/62255
EWS
Comment 3
2026-04-08 09:45:30 PDT
Committed
310783@main
(1829d31df680): <
https://commits.webkit.org/310783@main
> Reviewed commits have been landed. Closing PR #62255 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug