[wpt-sync] Sync PR 62571 - [geolocation] Test that cached positions are only reused for a matching accuracyMode
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox158 fixed)
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62571 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62571
Details from upstream follow.
Marcos Caceres <caceres_m@apple.com> wrote:
[geolocation] Test that cached positions are only reused for a matching accuracyMode
Adds coverage for the accuracyMode cache-matching rule from https://github.com/w3c/geolocation/pull/233, which says a cached position may only be reused when its recorded accuracyMode equals the one now being requested. Nothing in the suite tests it today, in either direction.
Both subtests move the emulated position between the two requests and compare timestamps rather than coordinates, because a reused precise position that gets coarsened on delivery also differs from the one that was cached, so comparing coordinates would pass on the bug being tested. A reused cached position keeps its original timestamp, which holds however much an implementation coarsens.
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=93073
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 22 tests and 1 subtests
Status Summary
Firefox
OK : 10[Gecko-linux2404-64-debug] 11[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 101[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 104[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 6[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 9[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
ERROR : 1[GitHub] 11[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
NOTRUN: 2[GitHub] 21[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 1
FAIL : 2
Safari
ERROR : 1
NOTRUN: 2
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /geolocation/PositionOptions.https.html [wpt.fyi]
- Set timeout and maximumAge to 0, check that timeout error raised (watchPosition):
FAIL - Check that a negative timeout and maxAge values are clamped to 0 (watchPosition):
FAIL
- Set timeout and maximumAge to 0, check that timeout error raised (watchPosition):
- /geolocation/disabled-by-permissions-policy.https.sub.html [wpt.fyi]:
ERROR- Permissions-Policy header geolocation=() disallows the top-level document.:
FAIL - Permissions-Policy header geolocation=() disallows same-origin iframes.:
FAIL - Permissions-Policy header geolocation=() disallows cross-origin iframes.:
FAIL
- Permissions-Policy header geolocation=() disallows the top-level document.:
- /geolocation/enabled-by-permission-policy-attribute-redirect-on-load.https.sub.html [wpt.fyi]:
ERROR- Permissions-Policy allow="geolocation" allows same-origin redirection:
NOTRUN - Permissions-Policy allow="geolocation" disallows cross-origin redirection:
NOTRUN
- Permissions-Policy allow="geolocation" allows same-origin redirection:
- /geolocation/enabled-by-permissions-policy.https.sub.html [wpt.fyi]:
ERROR- Permissions-Policy header geolocation=* allows the top-level document.:
NOTRUN - Permissions-Policy header geolocation=* allows same-origin iframes.:
NOTRUN - Permissions-Policy header geolocation=* allows cross-origin iframes.:
NOTRUN
- Permissions-Policy header geolocation=* allows the top-level document.:
- /geolocation/enabled-on-self-origin-by-permissions-policy.https.sub.html [wpt.fyi]:
ERROR- Permissions-Policy header geolocation=(self) allows the top-level document.:
NOTRUN - Permissions-Policy header geolocation=(self) allows same-origin iframes.:
NOTRUN - Permissions-Policy header geolocation=(self) disallows cross-origin iframes.:
NOTRUN
- Permissions-Policy header geolocation=(self) allows the top-level document.:
- /geolocation/getCurrentPosition-accuracyMode-cache.https.html [wpt.fyi]:
ERROR(Chrome:OK, Safari:ERROR)- A cached approximate position is not reused for a precise request:
NOTRUN(Chrome:FAIL, Safari:NOTRUN) - A cached precise position is not reused for an approximate request:
NOTRUN(Chrome:FAIL, Safari:NOTRUN)
- A cached approximate position is not reused for a precise request:
- /geolocation/getCurrentPosition-accuracyMode.https.html [wpt.fyi]:
ERROR- getCurrentPosition with accuracyMode: "approximate":
NOTRUN - getCurrentPosition with accuracyMode: "precise":
NOTRUN
- getCurrentPosition with accuracyMode: "approximate":
- /geolocation/getCurrentPosition-error.https.html [wpt.fyi]:
ERROR- Tests Geolocation error callback:
NOTRUN
- Tests Geolocation error callback:
- /geolocation/getCurrentPosition-success.https.html [wpt.fyi]:
ERROR- getCurrentPosition called with success and error callbacks:
NOTRUN - Error callback is nullable for getCurrentPosition().:
NOTRUN
- getCurrentPosition called with success and error callbacks:
- /geolocation/getCurrentPosition_TypeError.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-linux2404-64-debug] - /geolocation/getCurrentPosition_permission_deny.https.html [wpt.fyi]
- User denies access, check that error callback is called with correct code:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
- User denies access, check that error callback is called with correct code:
- /geolocation/heading-stationary.https.html [wpt.fyi]:
ERROR- heading is null when stationary (speed is 0):
FAIL - heading has a value when moving (speed > 0):
NOTRUN
- heading is null when stationary (speed is 0):
- /geolocation/non-fully-active.https.html [wpt.fyi]:
ERROR- watchPosition returns 0 for non-fully-active document:
NOTRUN - watchPosition calls errorCallback with POSITION_UNAVAILABLE for non-fully-active document:
NOTRUN - getCurrentPosition calls errorCallback with POSITION_UNAVAILABLE for non-fully-active document:
NOTRUN - re-attached document restores geolocation functionality:
NOTRUN
- watchPosition returns 0 for non-fully-active document:
- /geolocation/tojson.https.window.html [wpt.fyi]:
ERROR- Test toJSON() in GeolocationPosition and GeolocationCoordinates.:
NOTRUN
- Test toJSON() in GeolocationPosition and GeolocationCoordinates.:
- /geolocation/watchPosition_permission_deny.https.html [wpt.fyi]
- Check that watchPosition returns synchronously before any callbacks are invoked.:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - User denies access, check that error callback is called.:
FAIL[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt]
- Check that watchPosition returns synchronously before any callbacks are invoked.:
Tests Disabled in Gecko Infrastructure
- /geolocation/getCurrentPosition_TypeError.https.html [wpt.fyi]:
OK[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],SKIP[Gecko-linux2404-64-debug]
Comment 4•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/e4ad13bb281c
https://hg.mozilla.org/mozilla-central/rev/441fbfefb132
Description
•