UserAgent inside ServiceWorker does not match the emulated one (mobile device)
Reported by
alex.alv...@marfeel.com,
Jul 12 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: 1. Open a site in chrome emulating a mobile device 2. Check window.navigator.userAgent with the console in the window context (e.g Nexus 6P "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Mobile Safari/537.36") 3. Check self.navigator.userAgent in the service worker context (e.g Nexus 6P "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36") What is the expected behavior? The userAgent must be consistent in all the contexts (service worker, window) while we are emulating a device What went wrong? The userAgent is correctly set in the window context while you are emulating a mobile device but is not overrided in the service worker context (keeping the computer one) Did this work before? N/A Chrome version: 59.0.3071.115 Channel: stable OS Version: OS X 10.12.4 Flash Version:
,
Dec 14 2017
,
Dec 14 2017
Any reason why this has been archived? |
||
►
Sign in to add a comment |
||
Comment 1 by alph@chromium.org
, Jul 12 2017Status: Assigned (was: Unconfirmed)