Bug 193762

Summary: Need a mechanism to override navigator.userAgent
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: WebKit2Assignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, bfulgham, cdumez, dbates, ews-watchlist, ggaren, japhet, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=193950
Attachments:
Description Flags
WIP
none
Adds a mechanism
none
Added another test case
bfulgham: review+, ews-watchlist: commit-queue-
Archive of layout-test-results from ews107 for mac-highsierra-wk2 none

Description Ryosuke Niwa 2019-01-23 21:38:35 PST
We need a mechanism to override user agent string just for navigator.userAgent without affecting UA string we send to the server.
Comment 1 Radar WebKit Bug Importer 2019-01-23 21:38:59 PST
<rdar://problem/47504939>
Comment 2 Ryosuke Niwa 2019-01-23 21:40:23 PST
Created attachment 359993 [details]
WIP
Comment 3 Ryosuke Niwa 2019-01-25 00:00:20 PST
Created attachment 360088 [details]
Adds a mechanism
Comment 4 Ryosuke Niwa 2019-01-25 18:42:25 PST
Ping reviewers.
Comment 5 Brent Fulgham 2019-01-25 18:52:06 PST
Comment on attachment 360088 [details]
Adds a mechanism

Could the test confirm that we get standard WebKit UA in headers, instead of using two custom user agents?

Otherwise, looks good, but I think a loader person should give a final sign-off.
Comment 6 Ryosuke Niwa 2019-01-25 19:29:46 PST
(In reply to Brent Fulgham from comment #5)
> Comment on attachment 360088 [details]
> Adds a mechanism
> 
> Could the test confirm that we get standard WebKit UA in headers, instead of
> using two custom user agents?

I guess I can add another test for that.
Comment 7 Ryosuke Niwa 2019-01-25 20:24:10 PST
Created attachment 360217 [details]
Added another test case
Comment 8 Brent Fulgham 2019-01-25 20:32:57 PST
Comment on attachment 360217 [details]
Added another test case

Looks great! r=me
Comment 9 EWS Watchlist 2019-01-25 21:41:02 PST
Comment on attachment 360217 [details]
Added another test case

Attachment 360217 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/10897704

New failing tests:
http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html
Comment 10 EWS Watchlist 2019-01-25 21:41:03 PST
Created attachment 360223 [details]
Archive of layout-test-results from ews107 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 11 Ryosuke Niwa 2019-01-25 22:51:01 PST
Committed r240541: <https://trac.webkit.org/changeset/240541>