Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f010ba868212b2113ca0727ce46f06273cb5fd0a
https://github.com/WebKit/WebKit/commit/f010ba868212b2113ca0727ce46f06273cb5fd0a
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-22 (Wed, 22 Jul 2026)
Changed paths:
A
LayoutTests/http/tests/site-isolation/inspector/console/clear-across-frame-targets-expected.txt
A
LayoutTests/http/tests/site-isolation/inspector/console/clear-across-frame-targets.html
Log Message:
-----------
Web Inspector: add a regression test for clearing the Console across frame
targets under site isolation
https://bugs.webkit.org/show_bug.cgi?id=319035
rdar://181885109
Reviewed by Qianlang Chen.
A frontend-initiated console clear (the Clear button and its keyboard
shortcut) routes through `WI.consoleManager.requestClearMessages()`,
which fans `Console.clearMessages` out to every Console-capable target
and only completes once a `Console.messagesCleared` event comes back and
`WI.ConsoleManager.Event.Cleared` is dispatched. There is no local
fallback, so if that fan-out ever stopped covering a target whose
console agent produced messages, the clear would silently get stuck and
the log would never empty.
Under site isolation, messages can originate from multiple frame targets
(same- and cross-origin), each with its own console agent. Today this
works because the frontend enables Console on exactly the same target
set it later clears (`WI.Target` init vs. `requestClearMessages()`), so
every cleared target is already enabled and echoes `messagesCleared`.
Add a test that locks in this invariant: it logs from a same-origin and
a cross-origin iframe, confirms exactly the three expected frame targets
(main frame, same-origin iframe, cross-origin iframe) exist and support
Console, requests a frontend clear, asserts the `Cleared` event fires,
and finally re-enables Console on each frame target to confirm no
messages get replayed from the backend, proving the clear actually
reached and executed there rather than just producing a frontend event.
No behavior change; test only.
*
LayoutTests/http/tests/site-isolation/inspector/console/clear-across-frame-targets.html:
Added.
*
LayoutTests/http/tests/site-isolation/inspector/console/clear-across-frame-targets-expected.txt:
Added.
Canonical link: https://commits.webkit.org/317743@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications