Skip to content

[geolocation] fix the accuracyMode test's precise case and coordinate assertions - #61886

Merged
marcoscaceres merged 1 commit into
web-platform-tests:masterfrom
marcoscaceres:geolocation-accuracymode-test-fixes
Aug 12, 2026
Merged

[geolocation] fix the accuracyMode test's precise case and coordinate assertions#61886
marcoscaceres merged 1 commit into
web-platform-tests:masterfrom
marcoscaceres:geolocation-accuracymode-test-fixes

Conversation

@marcoscaceres

Copy link
Copy Markdown
Contributor

The second test is named "precise" but requested "approximate", and w3c/geolocation#233 sets altitude, altitudeAccuracy, heading and speed to null for an approximate position unconditionally, so enableHighAccuracy cannot reinstate them and the test's assertions could not hold; this switches the options to match the test's name.

The first test compared the coordinates against the emulated values, which an implementation that coarsens cannot satisfy, since the pull request leaves what counts as a coarsened area to the underlying system; the type checks keep those properties required without dictating their values.

Also drops two assignments to an undeclared calledAsync global.

… assertions

The second test is named "precise" but requested "approximate" and then asserted that altitude,
altitudeAccuracy, heading and speed come back populated, which w3c/geolocation#233 requires to be null
for an approximate position.

The first test asserted that the emulated latitude, longitude and accuracy come back unchanged, which an
implementation that actually coarsens cannot satisfy, and the pull request leaves the coarsened area to
the underlying system.

Also drops two assignments to an undeclared calledAsync global.
@antosart

Copy link
Copy Markdown
Contributor

Indeed, thanks for the fix! LGTM.

@marcoscaceres
marcoscaceres enabled auto-merge (squash) August 12, 2026 14:53
@marcoscaceres
marcoscaceres merged commit 3159769 into web-platform-tests:master Aug 12, 2026
28 checks passed
@marcoscaceres
marcoscaceres deleted the geolocation-accuracymode-test-fixes branch August 13, 2026 07:30
markafoltz pushed a commit to markafoltz/web-platform-tests that referenced this pull request Aug 17, 2026
… assertions (web-platform-tests#61886)

The second test is named "precise" but requested "approximate" and then asserted that altitude,
altitudeAccuracy, heading and speed come back populated, which w3c/geolocation#233 requires to be null
for an approximate position.

The first test asserted that the emulated latitude, longitude and accuracy come back unchanged, which an
implementation that actually coarsens cannot satisfy, and the pull request leaves the coarsened area to
the underlying system.

Also drops two assignments to an undeclared calledAsync global.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants