Bug 311709
| Summary: | Fix flaky test http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-and-script-src-elem.html | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | roberto_rodriguez2 |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
roberto_rodriguez2
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
<rdar://problem/174297450>
roberto_rodriguez2
Pull request: https://github.com/WebKit/WebKit/pull/62255
EWS
Committed 310783@main (1829d31df680): <https://commits.webkit.org/310783@main>
Reviewed commits have been landed. Closing PR #62255 and removing active labels.