RESOLVED FIXED 196621
Add a test to check for the service worker process name
https://bugs.webkit.org/show_bug.cgi?id=196621
Summary Add a test to check for the service worker process name
youenn fablet
Reported 2019-04-04 13:04:26 PDT
Add a test to check for the service worker process name
Attachments
Patch (8.09 KB, patch)
2019-04-04 13:06 PDT, youenn fablet
no flags
Patch (10.20 KB, patch)
2019-04-04 13:32 PDT, youenn fablet
no flags
Patch for landing (11.04 KB, patch)
2019-04-08 14:51 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2019-04-04 13:06:29 PDT
youenn fablet
Comment 2 2019-04-04 13:32:24 PDT
Chris Dumez
Comment 3 2019-04-08 13:09:56 PDT
Comment on attachment 366747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366747&action=review > Source/WebCore/testing/ServiceWorkerInternals.mm:2 > + * Copyright (C) 2018 Apple Inc. All rights reserved. 2019 > Source/WebCore/testing/ServiceWorkerInternals.mm:40 > + return "name: " + name; Why prepend "name: " ? I think the test would look much better without.
youenn fablet
Comment 4 2019-04-08 13:14:48 PDT
(In reply to Chris Dumez from comment #3) > Comment on attachment 366747 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=366747&action=review > > > Source/WebCore/testing/ServiceWorkerInternals.mm:2 > > + * Copyright (C) 2018 Apple Inc. All rights reserved. > > 2019 OK > > Source/WebCore/testing/ServiceWorkerInternals.mm:40 > > + return "name: " + name; > > Why prepend "name: " ? I think the test would look much better without. The default implementation of processName() returns an empty string. If the call to _LSCopyApplicationInformationItem is returning an empty string, we will fail the test as it would be "name:" and not "".
Chris Dumez
Comment 5 2019-04-08 13:30:56 PDT
Comment on attachment 366747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366747&action=review >>> Source/WebCore/testing/ServiceWorkerInternals.mm:40 >>> + return "name: " + name; >> >> Why prepend "name: " ? I think the test would look much better without. > > The default implementation of processName() returns an empty string. > If the call to _LSCopyApplicationInformationItem is returning an empty string, we will fail the test as it would be "name:" and not "". You would fail the test either way since your layout test expects: "WebKitTestRunner Service Worker (localhost)". As it stands, your getter is lying, it does not return only the name.
youenn fablet
Comment 6 2019-04-08 14:46:54 PDT
> You would fail the test either way since your layout test expects: > "WebKitTestRunner Service Worker (localhost)". No, since we check for name.length, which allows to pass for iOS/GTK. I'll change the default implementation to return "n/a" and check for this string instead.
youenn fablet
Comment 7 2019-04-08 14:51:09 PDT
Created attachment 366987 [details] Patch for landing
WebKit Commit Bot
Comment 8 2019-04-08 15:29:53 PDT
Comment on attachment 366987 [details] Patch for landing Clearing flags on attachment: 366987 Committed r244054: <https://trac.webkit.org/changeset/244054>
WebKit Commit Bot
Comment 9 2019-04-08 15:29:54 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2019-04-08 15:30:19 PDT
Note You need to log in before you can comment on or make changes to this bug.