Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dfdfcf49da912234a4cc023324bf52da4f967c43
      
https://github.com/WebKit/WebKit/commit/dfdfcf49da912234a4cc023324bf52da4f967c43
  Author: Chris Dumez <[email protected]>
  Date:   2026-05-07 (Thu, 07 May 2026)

  Changed paths:
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebsiteDatastore.mm

  Log Message:
  -----------
  TestWebKitAPI.WKWebsiteDataStore.FetchPersistentCredentials is flaky
https://bugs.webkit.org/show_bug.cgi?id=309374
rdar://171928551

Reviewed by Sihui Liu.

The test's NavigationTestDelegate used a `static bool firstChallenge` shared 
across all
tests. When FetchPersistentCredentials ran after FetchNonPersistentCredentials, 
the static
was already false so no credential was provided and the test trivially passed. 
When it ran
first or in isolation, firstChallenge was true, a permanent credential was 
stored, and
NSURLSession's session-level copy appeared in fetchDataRecordsOfTypes (count=1 
instead of 0).

Fix by making firstChallenge a per-instance variable so each test gets its own 
fresh state,
and terminating the network process after navigation to clear any session-level 
credential
copies before the fetch.

* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebsiteDatastore.mm:
(-[NavigationTestDelegate init]):
(-[NavigationTestDelegate 
webView:didReceiveAuthenticationChallenge:completionHandler:]):
(TestWebKitAPI::(WKWebsiteDataStore, FetchPersistentCredentials)):
(TestWebKitAPI::(WKWebsiteDataStore, 
DISABLED_FetchPersistentCredentials)(WKWebsiteDataStore, 
FetchPersistentCredentials)): Deleted.

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



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

Reply via email to