Permissions API do not respect '--use-fake-ui-for-media-stream' flag properly
Reported by
szmyda...@gmail.com,
Jan 18
(5 days ago)
|
|
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Steps to reproduce the problem: Testing file (permissions-api.html) needs to be served from some valid domain in order for Permissions API to work properly. I've hosted it at my github account: https://aszmyd.github.io/sandbox/permissions-api.html You can also serve it locally if you want. Later in steps I'll consider its hosted somewhere and call this location as TEST_PAGE. 1. Open TEST_PAGE using normal chrome stable instance 2. Click `Check permissions` button. You'll see `Current Permissions: prompt` 3. Click `Ask for permission` and allow for microphone access. 4. `Current Permissions` will switch to `granted` - That's all correct behaviour 5. Open TEST page using chrome instance with `--use-fake-ui-for-media-stream` flag 6. Repeat step 2 and 3 - this time, even though microphone access was granted (fake media stream), `Current Permission` remain in `prompt` state What is the expected behavior? Permissions API should return `granted` when asking for i.e. microphone permission if such media stream permissions is granted - even if its an fake media stream thanks to `--use-fake-ui-for-media-stream` flag What went wrong? Because microphone media stream was fake, Permissions API returned microphone permission status as `prompt` instead of `granted` Did this work before? No Does this work in other browsers? Yes Chrome version: 71.0.3578.98 Channel: stable OS Version: Fedora 29 Flash Version: For me its an issue with headless chrome functional testing of my app. I have a temporary workaround that mocks `query` method when i need it: `navigator.permissions.query = () => Promise.resolve({state: "granted"})` But that is just an ugly workaround around this and it should probably be fixed. |
|
►
Sign in to add a comment |
|
Comment 1 by susan.boorgula@chromium.org
, Jan 20 (2 days ago)