Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aef0bf9034507ee85c5fd12404928781a7f78154
      
https://github.com/WebKit/WebKit/commit/aef0bf9034507ee85c5fd12404928781a7f78154
  Author: Timothy Hatcher <[email protected]>
  Date:   2026-04-14 (Tue, 14 Apr 2026)

  Changed paths:
    M Tools/TestWebKitAPI/Helpers/cocoa/WebExtensionUtilities.h
    M Tools/TestWebKitAPI/Helpers/cocoa/WebExtensionUtilities.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionContext.mm

  Log Message:
  -----------
  REGRESSION(311150@main): 
TestWebKitAPI.WKWebExtensionContext.CallingMissingBrowserAPIInBackground is 
flakey.
https://webkit.org/b/312278
rdar://174749864

Reviewed by Brady Eidson.

Fix flaky extension script error tests by replacing fixed time interval waits 
with a notification-based `runUntilContextError`
helper that returns immediately if errors are already present, or waits up to 5 
seconds before timeout.

* Tools/TestWebKitAPI/Helpers/cocoa/WebExtensionUtilities.h:
* Tools/TestWebKitAPI/Helpers/cocoa/WebExtensionUtilities.mm:
(-[TestWebExtensionManager runUntilContextError]): Added.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionContext.mm:
(TestWebKitAPI::TEST(WKWebExtensionContext, LoadNonExistentImage)):
(TestWebKitAPI::TEST(WKWebExtensionContext, TopLevelThrowInModuleBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, ReferenceErrorInBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
CallingMissingBrowserAPIInBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, UncaughtScriptErrorInBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
UnhandledPromiseRejectionInBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
UncaughtScriptErrorInServiceWorkerBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
UnhandledPromiseRejectionInServiceWorkerBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, SyntaxErrorInBackground)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
UncaughtScriptErrorInContentScript)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
UncaughtScriptErrorInMainWorldContentScript)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
PageScriptErrorNotReportedToExtension)):
(TestWebKitAPI::TEST(WKWebExtensionContext, 
UncaughtScriptErrorInEventListener)):
(TestWebKitAPI::TEST(WKWebExtensionContext, TopLevelThrowInPopup)):
(TestWebKitAPI::TEST(WKWebExtensionContext, ConsoleErrorReportedNotLogOrWarn)):
(TestWebKitAPI::TEST(WKWebExtensionContext, ConsoleAssertWithMessage)):
(TestWebKitAPI::TEST(WKWebExtensionContext, ConsoleAssertWithoutMessage)):

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



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

Reply via email to