Bug 312315
| Summary: | [Site Isolation] CSP frame-src-cross-origin-load.html test fails with site isolation due to incorrect onload assignment | ||
|---|---|---|---|
| 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
Test http/tests/security/contentSecurityPolicy/frame-src-cross-origin-load.html is incorrectly written with iframe.onload = loadEvent(), which calls loadEvent immediately instead of assigning it as a handler. All three load callbacks fire synchronously and finishJSTest runs before any iframe actually loads. Without site isolation this coincidentally works because the cross-origin iframe runs in the same process and its console.log("PASS") IPC reaches the UIProcess before notifyDone() finalizes the test. With site isolation the iframe loads in a separate process, and the extra IPC latency means the console message arrives after gotFinalMessage is set and is silently dropped.
The fix is to properly assign the iframe.onload handler and update the expected output accordingly now that iframe onloads fire in the correct order.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/174778663>
roberto_rodriguez2
Pull request: https://github.com/WebKit/WebKit/pull/62774
EWS
Committed 311290@main (e12578547350): <https://commits.webkit.org/311290@main>
Reviewed commits have been landed. Closing PR #62774 and removing active labels.