Bug 308243
| Summary: | [macOS iOS] http/tests/site-isolation/mixedContent/redirect-https-to-http-iframe-in-main-frame.html is a flaky text failure | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Diego De La Toba <d_delatoba> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | beidson, rniwa, sihui_liu, webkit-bot-watchers-bugzilla, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Diego De La Toba
http/tests/site-isolation/mixedContent/redirect-https-to-http-iframe-in-main-frame.html is a flaky text failure on macOS and iOS release.
HISTORY:
https://results.webkit.org/?suite=layout-tests&test=http%2Ftests%2Fsite-isolation%2FmixedContent%2Fredirect-https-to-http-iframe-in-main-frame.html
DIFF:
--- /Volumes/Data/worker/Apple-Tahoe-Release-AppleSilicon-WK2-Tests/build/layout-test-results/http/tests/site-isolation/mixedContent/redirect-https-to-http-iframe-in-main-frame-expected.txt
+++ /Volumes/Data/worker/Apple-Tahoe-Release-AppleSilicon-WK2-Tests/build/layout-test-results/http/tests/site-isolation/mixedContent/redirect-https-to-http-iframe-in-main-frame-actual.txt
@@ -9,5 +9,5 @@
main frame - didHandleOnloadEventsForFrame
frame "<!--frame1-->" - didFailProvisionalLoadWithError
+This test opens a window that loads an insecure iframe (via a tricky redirect). We should trigger a mixed content callback because the main frame in the window is HTTPS but is displaying content that can be controlled by an active network attacker.
main frame - didFinishLoadForFrame
-This test opens a window that loads an insecure iframe (via a tricky redirect). We should trigger a mixed content callback because the main frame in the window is HTTPS but is displaying content that can be controlled by an active network attacker.
DIFF URL:
https://build.webkit.org/results/Apple-Tahoe-Release-AppleSilicon-WK2-Tests/307837%40main%20(1808)/http/tests/site-isolation/mixedContent/redirect-https-to-http-iframe-in-main-frame-pretty-diff.html
Reproduction:
I was able to reproduce this failure on macOS Tahoe ToT with the following:
run-webkit-tests --no-build --no-retry --no-show-results --exit-after-n-failures=1 --expect-pass --iterations=1000 --force -f --clobber-old-results --release http/tests/site-isolation/mixedContent/redirect-https-to-http-iframe-in-main-frame.html
I was also able to reproduce on iOS 26.2 ToT with the following:
run-webkit-tests --no-build --no-retry --ios-simulator --iterations=1000 --force --clobber-old-results --release http/tests/site-isolation/mixedContent/redirect-https-to-http-iframe-in-main-frame.html
I am going to mark expectations as pass fail while this pends investigation
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/170749540>
Diego De La Toba
Pull request: https://github.com/WebKit/WebKit/pull/59025
EWS
Test gardening commit 307850@main (412d305a2e4e): <https://commits.webkit.org/307850@main>
Reviewed commits have been landed. Closing PR #59025 and removing active labels.
Diego De La Toba
This test is flaky across iOS and macOS due to missing or out-of-order output in the actual results. I think the root cause is in frame-with-redirect-https-to-http-frame.html: its onload handler posts a message that triggers notifyDone(), ending the test. However, the test harness logs frame load callbacks and console messages asynchronously. When onload fires and the message is posted immediately, notifyDone() can be called before the harness finishes logging all pending callbacks, resulting in missing or reordered output.
Adding a short delay before posting the message, allowing the test harness to complete logging before the test ends and resolves the flake across macOS and iOS. However you could argue that didFinishLoadForFrame should logically fire before onload JS runs, since "load finished" should precede "handle load event".
Diego De La Toba
Pull request: https://github.com/WebKit/WebKit/pull/59036