Bug 1775107 [wpt PR 34499] - Add requestPermission() to DeviceOrientationEvent and...
commit6ecd8cd0b45de7a07d0e9a578ed1b2672200b878
authorRaphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Mon, 4 Jul 2022 21:55:11 +0000 (4 21:55 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Tue, 5 Jul 2022 08:35:56 +0000 (5 08:35 +0000)
tree9631ad653de0ced78e904b7bc35df1fc1189890d
parent00ce4090f8cc5c696aba402d6ab01d70ef11fc37
Bug 1775107 [wpt PR 34499] - Add requestPermission() to DeviceOrientationEvent and DeviceMotionEvent., a=testonly

Automatic update from web-platform-tests
Add requestPermission() to DeviceOrientationEvent and DeviceMotionEvent.

Currently implemented behind the "DeviceOrientationRequestPermission"
runtime flag.

The API is kind of a stub at the moment: we do not prompt for permission
and merely resolve the returned promises to either "granted" or "denied"
based on the current Motion Sensor permissions.

The idea is to let developers start playing with the API while also
gathering user counter information so that we can later decide when to
switch to prompting for permission, preferably by default. Right now, we
count calls to requestPermission() as well as usages of
ondevice{motion,orientation} that happen without calling
requestPermission() first.

Intent to prototype:
https://groups.google.com/a/chromium.org/g/blink-dev/c/j7sGtCBGaxA

Bug: 947112
Change-Id: I2e0209755402b288c58b039aa800ecccf64bf8a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3714175
Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1019740}

--

wpt-commits: 0b6773805f484242b988ca8e5fe757e0438352c5
wpt-pr: 34499
testing/web-platform/tests/orientation-event/motion/requestPermission.https.window.js [new file with mode: 0644]
testing/web-platform/tests/orientation-event/orientation/requestPermission.https.window.js [new file with mode: 0644]