Bug 186204

Summary: [Cocoa] Web Automation: include browser name and version in listing for automation targets
Product: WebKit Reporter: BJ Burg <bburg>
Component: WebDriverAssignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, benjamin, cdumez, cgarcia, cmarcelo, darin, dbates, ews-watchlist, joepeck, keith_miller, mark.lam, msaboff, saam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed Fix
darin: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews206 for win-future none

Description BJ Burg 2018-06-01 12:43:40 PDT
.
Comment 1 BJ Burg 2018-06-01 12:43:54 PDT
<rdar://problem/36950423>
Comment 2 BJ Burg 2018-06-01 16:40:50 PDT
Created attachment 341803 [details]
Proposed Fix
Comment 3 EWS Watchlist 2018-06-02 03:42:36 PDT
Comment on attachment 341803 [details]
Proposed Fix

Attachment 341803 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7942045

New failing tests:
http/tests/preload/onload_event.html
Comment 4 EWS Watchlist 2018-06-02 03:42:47 PDT
Created attachment 341839 [details]
Archive of layout-test-results from ews206 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews206  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 5 Darin Adler 2018-06-05 15:42:28 PDT
Comment on attachment 341803 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=341803&action=review

> Source/WebKit/UIProcess/Cocoa/AutomationClient.h:58
> +    String browserName() const override;
> +    String browserVersion() const override;

final instead of override?

> Source/WebKit/UIProcess/Cocoa/AutomationClient.mm:88
> +        return [m_delegate.get() _processPoolBrowserNameForAutomation:m_processPool];

No need for the ".get()" here.

> Source/WebKit/UIProcess/Cocoa/AutomationClient.mm:94
> +    NSString *displayName = appBundle.infoDictionary[(__bridge NSString *)_kCFBundleDisplayNameKey];
> +    NSString *readableName = appBundle.infoDictionary[(__bridge NSString *)kCFBundleNameKey];
> +    return displayName ?: readableName;

Seems a bit of a shame to compute the readableName when the displayName is non-null. Maybe omit the local variables?

> Source/WebKit/UIProcess/Cocoa/AutomationClient.mm:100
> +        return [m_delegate.get() _processPoolBrowserVersionForAutomation:m_processPool];

No need for the ".get()" here.
Comment 6 BJ Burg 2018-06-08 13:46:27 PDT
Committed r232636: <https://trac.webkit.org/changeset/232636>