Bug 95093

Summary: Update TestRunner API for web notifications
Product: WebKit Reporter: Jon Lee <jonlee>
Component: Tools / TestsAssignee: Jon Lee <jonlee>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, dglazkov, eric, gyuyoung.kim, haraken, jberlin, jianli, mifenton, rakuco, rniwa, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 77969, 79492, 95154    
Attachments:
Description Flags
Patch ap: review+, ap: commit-queue-

Jon Lee
Reported 2012-08-27 08:51:54 PDT
Remove some unused legacy API, add some new API, and rename the functions from "desktop notifications" to "web notifications", since that is the official name of the spec.
Attachments
Patch (38.84 KB, patch)
2012-08-27 09:48 PDT, Jon Lee
ap: review+
ap: commit-queue-
Radar WebKit Bug Importer
Comment 1 2012-08-27 08:52:08 PDT
Jon Lee
Comment 2 2012-08-27 09:48:10 PDT
Eric Seidel (no email)
Comment 3 2012-08-27 13:15:28 PDT
Could we do this in window.internals instead? so we only have to implement it once instead of for each DRT?
Jon Lee
Comment 4 2012-08-27 13:45:02 PDT
(In reply to comment #3) > Could we do this in window.internals instead? so we only have to implement it once instead of for each DRT? It would be great if we can only do this once, but I do not think it is possible with this feature. There are three sets of APIs involved: 1) Permissions management: retrieving and requesting from JS. 2) Notification management: showing and closing from JS. 3) Platform events: mimicking a user clicking on and closing a notification from the platform. The first two sets are handled at the WK1/2 layer through port-specific implementations of NotificationClient, which I think implies different solutions for each DRT/WTR port. The last set is needed only by DRT/WTR, so I think it should remain in testRunner.
Alexey Proskuryakov
Comment 5 2012-08-29 09:41:27 PDT
Comment on attachment 160734 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=160734&action=review I going to say r+, but I think that naming needs to be clarified. > Tools/ChangeLog:22 > + (simulateLegacyWebNotificationClickCallback): Renamed. Unsure if you are talking about "legacy web notifications", or a "legacy way to simulate working with them". From the ChangeLog it sounds like the latter, but function name shouts the former. > Tools/DumpRenderTree/TestRunner.h:421 > - bool m_areDesktopNotificationPermissionRequestsIgnored; > + bool m_areLegacyWebNotificationPermissionRequestsIgnored; I could have used a comment here explaining what "legacy" means in this context. Specifically, how will one determine that it's time to remove this code?
Jon Lee
Comment 6 2012-08-29 10:17:28 PDT
(In reply to comment #5) > (From update of attachment 160734 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=160734&action=review > > I going to say r+, but I think that naming needs to be clarified. > > > Tools/ChangeLog:22 > > + (simulateLegacyWebNotificationClickCallback): Renamed. > > Unsure if you are talking about "legacy web notifications", or a "legacy way to simulate working with them". From the ChangeLog it sounds like the latter, but function name shouts the former. You're right. I mean to say the latter. I'll make a comment about this. I hope we can deprecate it soon enough when the tests get migrated to http/tests. > > > Tools/DumpRenderTree/TestRunner.h:421 > > - bool m_areDesktopNotificationPermissionRequestsIgnored; > > + bool m_areLegacyWebNotificationPermissionRequestsIgnored; > > I could have used a comment here explaining what "legacy" means in this context. Specifically, how will one determine that it's time to remove this code? Added.
Jon Lee
Comment 7 2012-08-29 10:27:28 PDT
Looks like in my fervor to check in 95099 (r126909) I ended up accidentally including this patch! I'll still check in another patch to add comments as ap suggested.
Jon Lee
Comment 8 2012-08-29 10:41:49 PDT
Note You need to log in before you can comment on or make changes to this bug.