Closed Bug 2072776 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62571 - [geolocation] Test that cached positions are only reused for a matching accuracyMode

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
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.

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
  • /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
  • /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
  • /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
  • /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
  • /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)
  • /geolocation/getCurrentPosition-accuracyMode.https.html [wpt.fyi]: ERROR
    • getCurrentPosition with accuracyMode: "approximate": NOTRUN
    • getCurrentPosition with accuracyMode: "precise": NOTRUN
  • /geolocation/getCurrentPosition-error.https.html [wpt.fyi]: ERROR
    • Tests Geolocation error callback: NOTRUN
  • /geolocation/getCurrentPosition-success.https.html [wpt.fyi]: ERROR
    • getCurrentPosition called with success and error callbacks: NOTRUN
    • Error callback is nullable for getCurrentPosition().: NOTRUN
  • /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]
  • /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
  • /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
  • /geolocation/tojson.https.window.html [wpt.fyi]: ERROR
    • Test toJSON() in GeolocationPosition and GeolocationCoordinates.: NOTRUN
  • /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]

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]
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8090b7db2a71 https://hg.mozilla.org/integration/autoland/rev/e4ad13bb281c [wpt PR 62571] - [geolocation] Test that cached positions are only reused for a matching accuracyMode, a=testonly https://github.com/mozilla-firefox/firefox/commit/9f82005d83b9 https://hg.mozilla.org/integration/autoland/rev/441fbfefb132 [wpt PR 62571] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.