Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b4acaee10c9773188f8386327a4bdeafc3eae994
https://github.com/WebKit/WebKit/commit/b4acaee10c9773188f8386327a4bdeafc3eae994
Author: Brady Eidson <[email protected]>
Date: 2024-07-25 (Thu, 25 Jul 2024)
Changed paths:
M Source/WTF/wtf/PlatformHave.h
M Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/webpushd/PushClientConnection.h
M Source/WebKit/webpushd/PushClientConnection.messages.in
M Source/WebKit/webpushd/PushClientConnection.mm
M Source/WebKit/webpushd/WebPushDaemon.h
M Source/WebKit/webpushd/WebPushDaemon.mm
A Source/WebKit/webpushd/_WKMockUserNotificationCenter.h
A Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm
M Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.mac.sb.in
M Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.relocatable.mac.sb.in
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm
Log Message:
-----------
Add API tests for webpushd built-in notifications
https://bugs.webkit.org/show_bug.cgi?id=277062
Reviewed by Ben Nham.
This adds a mock notification center to capture displayed notifications.
It then exercises push messages to get showNotification and getNotifications to
use that mock center,
delivering the results back to JavaScript
* Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/webpushd/PushClientConnection.h:
* Source/WebKit/webpushd/PushClientConnection.messages.in:
* Source/WebKit/webpushd/PushClientConnection.mm:
(WebPushD::PushClientConnection::enableMockUserNotificationCenterForTesting):
* Source/WebKit/webpushd/WebPushDaemon.h:
* Source/WebKit/webpushd/WebPushDaemon.mm:
(WebPushD::WebPushDaemon::injectPushMessageForTesting):
(WebPushD::platformNotificationCenterBundleIdentifier):
(WebPushD::WebPushDaemon::enableMockUserNotificationCenterForTesting):
(WebPushD::WebPushDaemon::showNotification):
(WebPushD::WebPushDaemon::getNotifications):
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.h: Copied from
Source/WebKit/Platform/spi/Cocoa/UserNotificationsSPI.h.
* Source/WebKit/webpushd/_WKMockUserNotificationCenter.mm: Added.
(notificationsByBundleIdentifier):
(-[_WKMockUserNotificationCenter initWithBundleIdentifier:]):
(-[_WKMockUserNotificationCenter
addNotificationRequest:withCompletionHandler:]):
(-[_WKMockUserNotificationCenter
getDeliveredNotificationsWithCompletionHandler:]):
* Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.mac.sb.in:
* Source/WebKit/webpushd/mac/com.apple.WebKit.webpushd.relocatable.mac.sb.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(-[PushNotificationDelegate init]):
(-[PushNotificationDelegate websiteDataStore:showNotification:]):
Canonical link: https://commits.webkit.org/281371@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