Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6696af1b6d5aeff18a62101163a33395dc0c08ea
https://github.com/WebKit/WebKit/commit/6696af1b6d5aeff18a62101163a33395dc0c08ea
Author: Rupin Mittal <[email protected]>
Date: 2025-04-30 (Wed, 30 Apr 2025)
Changed paths:
M Tools/TestWebKitAPI/Tests/WebKitCocoa/PermissionsAPI.mm
Log Message:
-----------
[Permissions API] Remove unused variables and unnecessary message handler and
delegate from API test
https://bugs.webkit.org/show_bug.cgi?id=292291
rdar://150306909
Reviewed by Youenn Fablet.
Currently, there are two different UIDelegates and message handlers.
But there's no need to have two different sets. We simply need one set.
The test should set a static variable that determines how the UIDelegate
will respond. And the message handler should put the message in a static
variable that can be checked by the test. This patch consolidates the code
to use one UIDelegate and one message handler in this way.
We also remove unused variables and ensure both API tests are using the same
variables to run the test (didReceiveMessage, didReceiveQueryPermission).
This is all in preparation for making changes to how the Permission API
handles Geolocation. We'll have to write tests for those changes and it'll
be easier and cleaner with this refactoring.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/PermissionsAPI.mm:
(-[PermissionsAPIMessageHandler
userContentController:didReceiveScriptMessage:]):
(-[PermissionsAPIUIDelegate
_webView:queryPermission:forOrigin:completionHandler:]):
(TestWebKitAPI::TEST(PermissionsAPI, DataURL)):
(TestWebKitAPI::TEST(PermissionsAPI, OnChange)):
(-[PermissionChangedTestAPIMessageHandler
userContentController:didReceiveScriptMessage:]): Deleted.
(-[PermissionChangedTestAPIUIDelegate
_webView:queryPermission:forOrigin:completionHandler:]): Deleted.
Canonical link: https://commits.webkit.org/294326@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes