NEW315313
Web Inspector: InspectorTest.completeTest() should optionally force teardown of the inspected WebPageProxy and WebPageInspectorController inside test boundaries
https://bugs.webkit.org/show_bug.cgi?id=315313
Summary Web Inspector: InspectorTest.completeTest() should optionally force teardown ...
Blaze Burg
Reported 2026-05-21 12:31:16 PDT
Follow-up from PR #65376 (webkit.org/b/314902) review by Qianlang Chen (the-chenergy): > This is another instance of an inspector test failing to catch leaked > objects and making a different test run in the same test bot fail > instead. Maybe we should file a bug to add a functionality to > InspectorTest.completeTest() or the async test suite to optionally > force the teardown of the inspected WebPageProxy and its > WebPageInspectorController within the inspector test's boundary, and > opt into that in our site isolation layout tests. Problem: Inspector layout tests can leave WebPageProxy / WebPageInspectorController objects alive past the test boundary. Receiver registrations or other instrumentation state then leak into a subsequent unrelated test, which is the test that actually trips an assertion or fails. Diagnosing those failures requires tracing back through the test bot run history, which is expensive. Proposal: extend InspectorTest.completeTest() (or the async test suite scaffolding) so a test can opt into forced teardown of the inspected WebPageProxy + its WebPageInspectorController at completion. Site isolation layout tests should opt in by default since they exercise the most surface area for instrumentation lifecycle bugs. This would have caught webkit.org/b/314902 (and the prior b/314808 instance) within the offending test, rather than surfacing as a flake in unrelated SI tests like ApplePayButton.html.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-05-21 12:31:22 PDT
Note You need to log in before you can comment on or make changes to this bug.