Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d50f0985bd87cea71d151d419d375df3322dad31
      
https://github.com/WebKit/WebKit/commit/d50f0985bd87cea71d151d419d375df3322dad31
  Author: Ben Nham <[email protected]>
  Date:   2026-03-04 (Wed, 04 Mar 2026)

  Changed paths:
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm

  Log Message:
  -----------
  Fix flaky timeout in 
WKUserContentController.DidAssociateFormControlsFromShadowTree
https://bugs.webkit.org/show_bug.cgi?id=304021
rdar://problem/166325413

Reviewed by Per Arne Vollan.

This test is flaky because it uses `synchronouslyLoadHTMLString:`. Loading the 
HTML will cause the
`webkitassociateformcontrols` event to be fired, and a 50 ms timer to be 
scheduled which creates an
alert. Then we spin the run loop until the load completion handler fires. If 
the timer fires as part
of the run loop spin, then the alert drops on the floor before we can run 
`_test_waitForAlert`,
which causes the test times out.

To fix this, use `loadHTMLString:baseURL:` instead, since that doesn't spin the 
run loop before
`_test_waitForAlert`.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TEST(WKUserContentController, DidAssociateFormControlsFromShadowTree)):

Canonical link: https://commits.webkit.org/308664@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to