Bug 193762 - Need a mechanism to override navigator.userAgent
Summary: Need a mechanism to override navigator.userAgent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-23 21:38 PST by Ryosuke Niwa
Modified: 2019-01-28 20:35 PST (History)
11 users (show)

See Also:


Attachments
WIP (9.82 KB, patch)
2019-01-23 21:40 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Adds a mechanism (16.14 KB, patch)
2019-01-25 00:00 PST, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Added another test case (18.09 KB, patch)
2019-01-25 20:24 PST, Ryosuke Niwa
bfulgham: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (3.20 MB, application/zip)
2019-01-25 21:41 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>