Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a899e6f6ed50d213260227bfac861f67e5b60e54
      
https://github.com/WebKit/WebKit/commit/a899e6f6ed50d213260227bfac861f67e5b60e54
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2025-03-25 (Tue, 25 Mar 2025)

  Changed paths:
    M Tools/TestWebKitAPI/SourcesCocoa.txt
    A Tools/TestWebKitAPI/TestScriptMessageHandler.mm
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm
    A Tools/TestWebKitAPI/cocoa/TestScriptMessageHandler.h
    A Tools/TestWebKitAPI/cocoa/TestScriptMessageHandler.mm

  Log Message:
  -----------
  REGRESSION(291435@main...291445@main): [iOS Debug] 
TestWebKitAPI.IndexedDB.IndexedDBSuspendImminently is a failure/timeout (flaky 
in EWS)
https://bugs.webkit.org/show_bug.cgi?id=290203
rdar://147599411

Reviewed by Sihui Liu.

TestWebKitAPI::Util::run doesn't necessarily stop everything when the condition 
becomes true.
There is a chance that more work can be done before it returns.
When multiple messages are awaited, sometimes we'll wait for the first one and 
the first
and second one are received before TestWebKitAPI::Util::run returns, then when 
we try to wait
for the second one, no more messages come.  I introduce 
TestScriptMessageHandler with a Deque
to make it more robust.  If it has already received a message, it just returns 
it immediately.
If it receives too many messages, it'll hang on to them until later.
A similar techinque is already used in TestWKWebView.waitForMessages

* Tools/TestWebKitAPI/SourcesCocoa.txt:
* Tools/TestWebKitAPI/TestScriptMessageHandler.mm: Added.
(-[TestScriptMessageHandler waitForMessage]):
(-[TestScriptMessageHandler userContentController:didReceiveScriptMessage:]):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBSuspendImminently.mm:
(TEST(IndexedDB, IndexedDBSuspendImminently)):
(TEST(IndexedDB, SuspendImminentlyForThirdPartyDatabases)):
(-[IndexedDBSuspendImminentlyMessageHandler 
userContentController:didReceiveScriptMessage:]): Deleted.
(runUntilMessageReceived): Deleted.
(keepNetworkProcessActive): Deleted.
(TEST(IndexedDB, DISABLED_IndexedDBSuspendImminently)): Deleted.
* Tools/TestWebKitAPI/cocoa/TestScriptMessageHandler.h: Added.
* Tools/TestWebKitAPI/cocoa/TestScriptMessageHandler.mm: Added.
(-[TestScriptMessageHandler waitForMessage]):
(-[TestScriptMessageHandler userContentController:didReceiveScriptMessage:]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to