[wpt-sync] Sync PR 45428 - orientation-event: Add Permissions Policy integration tests
Categories
(Core :: DOM: Device Interfaces, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 45428 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/45428
Details from upstream follow.
Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> wrote:
orientation-event: Add Permissions Policy integration tests
Add tests for deviceorientationabsolute, deviceorientation and devicemotion
as described in
https://w3c.github.io/deviceorientation/#permissions-policy-integration:
- The deviceorientation event requires the "accelerometer" and "gyroscope"
features.- The deviceorientationabsolute event requires the "accelerometer",
"gyroscope" and "magnetometer" features.- The devicemotion event requires the "accelerometer" and "gyroscope"
features.(WebKit currently requires the "magnetometer" feature for deviceorientation
events, see https://bugs.webkit.org/show_bug.cgi?id=271891).The tests being added follow permissions-policy/README.md's recommendations:
- Tests with different Permissions-Policy header values and how they
influence usage in the top-level frame, same-origin iframes and
cross-origin iframes.- Different values for the "allow" attribute and how they influece
same-origin and cross-origin iframes.- Usage of the "allow" attribute with redirection.
This is the minimum amount of coverage we need. These tests can be expanded
to include:
- Calls to
run_all_fp_tests_allow_self()
to test the behavior of the
default policy for each feature (it requires making the function work with
more than one feature).- The relative orientation to absolute orientation fallback behavior that
depends on whether the "magnetometer" feature is enabled.- Not enabling all features (it may cause an explosion in the number of
tests though).
Assignee | ||
Updated•1 year ago
|
Description
•