Validates the C-S-S webCompat Permissions API shim and native query path.
Expected behavior: navigator.permissions.query returns the correct state for native
permissions (camera and microphone). After granting or denying a permission, the returned state should match the
native permission state. For native permissions, the returned name should use the configured override
(for example, video_capture or audio_capture).
Bug behavior: when the Permissions API already exists, native permissions may not be intercepted and the returned state can be incorrect or unchanged after granting or denying.
Notes: To test the API-present path, ensure webCompat.permissionsPresent is enabled in
remote config for this build. The native messaging path is only used for permissions marked native
(camera and microphone in the Android override).
| Query name | Returned name | State | Error | Updated | Action |
|---|---|---|---|---|---|
| camera | (not queried) | - | - | - | |
| microphone | (not queried) | - | - | - | |
| geolocation | (not queried) | - | - | - | |
| notifications | (not queried) | - | - | - | |
| push | (not queried) | - | - | - | |
| (not queried) | - | - | - |
Query the camera permission and wait for the state to change via a change event.
If the permission is already granted or denied, you will be asked to clear and try again. After
you are prompted to grant/deny the permission, the status string should change from "Waiting..."
to "Success: granted/denied".