Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7dd830ffb65b9b60b0502f281638964acc193eea
https://github.com/WebKit/WebKit/commit/7dd830ffb65b9b60b0502f281638964acc193eea
Author: Pascoe <[email protected]>
Date: 2026-04-07 (Tue, 07 Apr 2026)
Changed paths:
M Tools/TestWebKitAPI/Helpers/cocoa/TestWKWebView.h
M Tools/TestWebKitAPI/Helpers/cocoa/TestWKWebView.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SOAuthorizationTests.mm
Log Message:
-----------
[macOS Debug]
TestWebKitAPI.SOAuthorizationPopUp.InterceptionSucceedCloseByItself is a flaky
failure
rdar://171756017
https://bugs.webkit.org/show_bug.cgi?id=309196
Reviewed by Abrar Rahman Protyasha.
The popup runs `postMessage('Hello.', '*'); window.close()` synchronously, but
the opener
detects `newWindow.closed` via a 200ms polling interval. Because
`window.close()` sets
`page->isClosing()` synchronously while postMessage is delivered
asynchronously, the poll
can fire between the two — observing closure before "Hello." arrives.
The test only needs to verify that both events occur, not their order. Add
`waitForMessagesUnordered:` to TestWKWebView, which buffers messages in
TestMessageHandler
and asserts with NSCountedSet equality. Re-enable the test unconditionally.
* Tools/TestWebKitAPI/Helpers/cocoa/TestWKWebView.h:
* Tools/TestWebKitAPI/Helpers/cocoa/TestWKWebView.mm:
(-[TestMessageHandler userContentController:didReceiveScriptMessage:]):
(-[TestMessageHandler receivedMessages]):
(-[TestWKWebView waitForMessagesUnordered:]):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SOAuthorizationTests.mm:
(TestWebKitAPI::TEST(SOAuthorizationPopUp, InterceptionSucceedCloseByItself)):
Canonical link: https://commits.webkit.org/310750@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications