Add a test to check for the service worker process name
Created attachment 366744 [details] Patch
Created attachment 366747 [details] Patch
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.
(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 "".
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.
> 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.
Created attachment 366987 [details] Patch for landing
Comment on attachment 366987 [details] Patch for landing Clearing flags on attachment: 366987 Committed r244054: <https://trac.webkit.org/changeset/244054>
All reviewed patches have been landed. Closing bug.
<rdar://problem/49714318>