Bug 136395

Summary: Need a way to get userAgent from WKWebView.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, buildbot, commit-queue, mitz, rniwa, sam, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch. Add _userAgent property for WKWebView.
none
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2
none
reload the patch and try again, since it is not related with the layout test fails. none

Description Yongjun Zhang 2014-08-29 16:52:52 PDT
I would be nice to have a property/method to return userAgent string from an WKWebView.
Comment 1 Yongjun Zhang 2014-08-29 17:15:24 PDT
Created attachment 237392 [details]
Patch.  Add _userAgent property for WKWebView.
Comment 2 Build Bot 2014-08-29 18:32:34 PDT
Comment on attachment 237392 [details]
Patch.  Add _userAgent property for WKWebView.

Attachment 237392 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/6102750010015744

New failing tests:
animations/3d/transform-origin-vs-functions.html
animations/animation-border-overflow.html
http/tests/appcache/abort-cache-onchecking.html
http/tests/appcache/abort-cache-onchecking-resource-404.html
http/tests/appcache/abort-cache-onchecking-manifest-404.html
animations/animation-add-events-in-handler.html
animations/animation-controller-drt-api.html
animations/additive-transform-animations.html
http/tests/appcache/404-resource.html
accessibility/alt-tag-on-image-with-nonimage-role.html
Comment 3 Build Bot 2014-08-29 18:32:36 PDT
Created attachment 237402 [details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-09  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 4 Yongjun Zhang 2014-09-02 09:58:03 PDT
Created attachment 237499 [details]
reload the patch and try again, since it is not related with the layout test fails.
Comment 5 Anders Carlsson 2014-09-02 15:26:06 PDT
Comment on attachment 237499 [details]
reload the patch and try again, since it is not related with the layout test fails.

Since we can have different user agents for different URLs, would it make sense to make userAgent take an URL?
Comment 6 Yongjun Zhang 2014-09-02 15:53:47 PDT
(In reply to comment #5)
> (From update of attachment 237499 [details])
> Since we can have different user agents for different URLs, would it make sense to make userAgent take an URL?

For the issue I am currently working on, we just need the default user agent string.  It would be nice to have userAgentForURL, but looks like WebPageProxy doesn't have the information, and we would need to add a message to fetch from web process.
Comment 7 WebKit Commit Bot 2014-09-03 14:52:17 PDT
Comment on attachment 237499 [details]
reload the patch and try again, since it is not related with the layout test fails.

Clearing flags on attachment: 237499

Committed r173233: <http://trac.webkit.org/changeset/173233>
Comment 8 WebKit Commit Bot 2014-09-03 14:52:20 PDT
All reviewed patches have been landed.  Closing bug.