Introduce accuracyMode for GeolocationPosition [chromium/src : main]

78 views
Skip to first unread message

Tom Van Goethem (Gerrit)

unread,
Jan 28, 2026, 5:01:21 AMJan 28
to Antonio Sartori, Alvin Ji, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
Attention needed from Alvin Ji and Antonio Sartori

Tom Van Goethem added 1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Tom Van Goethem . resolved

Could you PTAL? Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Alvin Ji
  • Antonio Sartori
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
Gerrit-Change-Number: 7511640
Gerrit-PatchSet: 7
Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Antonio Sartori <antonio...@chromium.org>
Gerrit-Attention: Alvin Ji <alv...@chromium.org>
Gerrit-Comment-Date: Wed, 28 Jan 2026 10:01:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Antonio Sartori (Gerrit)

unread,
Jan 28, 2026, 6:20:42 AMJan 28
to Tom Van Goethem, Alvin Ji, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
Attention needed from Alvin Ji and Tom Van Goethem

Antonio Sartori added 1 comment

File third_party/blink/renderer/core/geolocation/geolocation_position.idl
Line 39, Patchset 7 (Latest): [RuntimeEnabled=ApproximateGeolocationPermission] readonly attribute AccuracyMode accuracyMode;
Antonio Sartori . unresolved

This needs to be guarded behind a different feature flag (ApproximateGeolocationPermissionAPIChanges or something similar), which can only be enabled if ApproximateGeolocationPermission is enabled (or which enables the ApproximateGeolocationPermission transitively).

Open in Gerrit

Related details

Attention is currently required from:
  • Alvin Ji
  • Tom Van Goethem
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
    Gerrit-Change-Number: 7511640
    Gerrit-PatchSet: 7
    Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
    Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
    Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
    Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Tom Van Goethem <t...@chromium.org>
    Gerrit-Attention: Alvin Ji <alv...@chromium.org>
    Gerrit-Comment-Date: Wed, 28 Jan 2026 11:20:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tom Van Goethem (Gerrit)

    unread,
    Jan 28, 2026, 9:16:16 AMJan 28
    to Antonio Sartori, Alvin Ji, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
    Attention needed from Alvin Ji and Antonio Sartori

    Tom Van Goethem voted and added 1 comment

    Votes added by Tom Van Goethem

    Commit-Queue+1

    1 comment

    File third_party/blink/renderer/core/geolocation/geolocation_position.idl
    Line 39, Patchset 7: [RuntimeEnabled=ApproximateGeolocationPermission] readonly attribute AccuracyMode accuracyMode;
    Antonio Sartori . resolved

    This needs to be guarded behind a different feature flag (ApproximateGeolocationPermissionAPIChanges or something similar), which can only be enabled if ApproximateGeolocationPermission is enabled (or which enables the ApproximateGeolocationPermission transitively).

    Tom Van Goethem

    Added a ApproximateGeolocationWebVisibleAPI feature flag.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alvin Ji
    • Antonio Sartori
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
      Gerrit-Change-Number: 7511640
      Gerrit-PatchSet: 8
      Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
      Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
      Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
      Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
      Gerrit-Attention: Antonio Sartori <antonio...@chromium.org>
      Gerrit-Attention: Alvin Ji <alv...@chromium.org>
      Gerrit-Comment-Date: Wed, 28 Jan 2026 14:16:04 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Antonio Sartori <antonio...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Antonio Sartori (Gerrit)

      unread,
      Jan 28, 2026, 10:04:49 AMJan 28
      to Tom Van Goethem, Alvin Ji, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
      Attention needed from Alvin Ji and Tom Van Goethem

      Antonio Sartori added 4 comments

      File chrome/android/javatests/src/org/chromium/chrome/browser/permissions/ApproximateGeolocationTest.java
      Line 53, Patchset 8 (Latest):@Features.EnableFeatures({PermissionsAndroidFeatureList.APPROXIMATE_GEOLOCATION_PERMISSION})
      Antonio Sartori . unresolved

      nit: you don't need braces {} if you only have one feature

      Line 78, Patchset 8 (Latest): ContentSettingsType.GEOLOCATION,
      Antonio Sartori . unresolved

      shouldn't you set GEOLOCATION_WITH_OPTIONS?

      Line 146, Patchset 8 (Latest): mPermissionRule.runJavaScriptCodeInCurrentTabWithGesture(
      Antonio Sartori . unresolved

      runJavaScriptCodeInCurrentTab should return the value from javascript. My understanding is that it should even work with promises. Can you try to use that instead of relying on the window title (!) being updated?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alvin Ji
      • Tom Van Goethem
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
        Gerrit-Change-Number: 7511640
        Gerrit-PatchSet: 8
        Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
        Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
        Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
        Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-Attention: Tom Van Goethem <t...@chromium.org>
        Gerrit-Attention: Alvin Ji <alv...@chromium.org>
        Gerrit-Comment-Date: Wed, 28 Jan 2026 15:04:14 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Alvin Ji (Gerrit)

        unread,
        Jan 28, 2026, 4:58:06 PM (14 days ago) Jan 28
        to Tom Van Goethem, Antonio Sartori, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
        Attention needed from Tom Van Goethem

        Alvin Ji added 1 comment

        File third_party/blink/web_tests/wpt_internal/geolocation-api/json.https.html
        Line 31, Patchset 8 (Latest): const expectedPosition = {timestamp, coords: mockCoords, accuracyMode: 'precise'};
        Alvin Ji . unresolved

        Currently the geolocation test in wpt_internal is using `third_party/blink/web_tests/wpt_internal/geolocation-api/resources/geolocation-mock.js` to intercept mojo message from blink. Hence the `setGeolocationPosition` and `makeGeoposition` need to be updated for having `accuracyMode` set too.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Tom Van Goethem
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
        Gerrit-Change-Number: 7511640
        Gerrit-PatchSet: 8
        Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
        Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
        Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
        Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-Attention: Tom Van Goethem <t...@chromium.org>
        Gerrit-Comment-Date: Wed, 28 Jan 2026 21:57:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Tom Van Goethem (Gerrit)

        unread,
        Feb 2, 2026, 10:06:03 AM (9 days ago) Feb 2
        to Chromium Metrics Reviews, Antonio Sartori, Alvin Ji, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
        Attention needed from Alvin Ji and Antonio Sartori

        Tom Van Goethem added 5 comments

        File chrome/android/javatests/src/org/chromium/chrome/browser/permissions/ApproximateGeolocationTest.java
        Line 53, Patchset 8:@Features.EnableFeatures({PermissionsAndroidFeatureList.APPROXIMATE_GEOLOCATION_PERMISSION})
        Antonio Sartori . resolved

        nit: you don't need braces {} if you only have one feature

        Tom Van Goethem

        Done

        Line 78, Patchset 8: ContentSettingsType.GEOLOCATION,
        Antonio Sartori . resolved

        shouldn't you set GEOLOCATION_WITH_OPTIONS?

        Tom Van Goethem

        Done

        Line 146, Patchset 8: mPermissionRule.runJavaScriptCodeInCurrentTabWithGesture(
        Antonio Sartori . unresolved

        runJavaScriptCodeInCurrentTab should return the value from javascript. My understanding is that it should even work with promises. Can you try to use that instead of relying on the window title (!) being updated?

        Tom Van Goethem

        I used the same mechanism as [related tests](https://source.chromium.org/chromium/chromium/src/+/main:chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java;l=166-199) here. However, I agree that relying on window title is not ideal, and was already working on a better approach in a follow-up CL. That CL will also combine both the API and `<geolocation>` permissions into a single test. Is it fine if I address this comment there?

        Line 182, Patchset 8: runTest(/* precise= */ true);
        Antonio Sartori . resolved
        Tom Van Goethem

        Done

        File third_party/blink/web_tests/wpt_internal/geolocation-api/json.https.html
        Line 31, Patchset 8: const expectedPosition = {timestamp, coords: mockCoords, accuracyMode: 'precise'};
        Alvin Ji . resolved

        Currently the geolocation test in wpt_internal is using `third_party/blink/web_tests/wpt_internal/geolocation-api/resources/geolocation-mock.js` to intercept mojo message from blink. Hence the `setGeolocationPosition` and `makeGeoposition` need to be updated for having `accuracyMode` set too.

        Tom Van Goethem

        Updated, and added test that checks both precise and approximate accuracy modes.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alvin Ji
        • Antonio Sartori
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
        Gerrit-Change-Number: 7511640
        Gerrit-PatchSet: 10
        Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
        Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
        Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
        Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
        Gerrit-Attention: Antonio Sartori <antonio...@chromium.org>
        Gerrit-Attention: Alvin Ji <alv...@chromium.org>
        Gerrit-Comment-Date: Mon, 02 Feb 2026 15:05:47 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Antonio Sartori <antonio...@chromium.org>
        Comment-In-Reply-To: Alvin Ji <alv...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Antonio Sartori (Gerrit)

        unread,
        Feb 2, 2026, 12:10:03 PM (9 days ago) Feb 2
        to Tom Van Goethem, Chromium Metrics Reviews, Alvin Ji, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
        Attention needed from Alvin Ji and Tom Van Goethem

        Antonio Sartori voted and added 3 comments

        Votes added by Antonio Sartori

        Code-Review+1

        3 comments

        Patchset-level comments
        File-level comment, Patchset 10 (Latest):
        Antonio Sartori . resolved

        Thanks! LGTM.

        File chrome/android/javatests/src/org/chromium/chrome/browser/permissions/ApproximateGeolocationTest.java
        Line 146, Patchset 8: mPermissionRule.runJavaScriptCodeInCurrentTabWithGesture(
        Antonio Sartori . resolved

        runJavaScriptCodeInCurrentTab should return the value from javascript. My understanding is that it should even work with promises. Can you try to use that instead of relying on the window title (!) being updated?

        Tom Van Goethem

        I used the same mechanism as [related tests](https://source.chromium.org/chromium/chromium/src/+/main:chrome/android/javatests/src/org/chromium/chrome/browser/permissions/RuntimePermissionTestUtils.java;l=166-199) here. However, I agree that relying on window title is not ideal, and was already working on a better approach in a follow-up CL. That CL will also combine both the API and `<geolocation>` permissions into a single test. Is it fine if I address this comment there?

        Antonio Sartori

        I guess it is :)

        File third_party/blink/web_tests/wpt_internal/geolocation-api/json.https.html
        Line 42, Patchset 10 (Latest):
        promise_test(async () => {
        mock.setGeolocationPermission(false, true);
        mock.setGeolocationPosition(mockCoords.latitude,
        mockCoords.longitude,
        mockCoords.accuracy);

        const position = await new Promise((resolve, reject) => {
        navigator.geolocation.getCurrentPosition(
        resolve,
        (e) => reject(new Error(`Error callback invoked unexpectedly: ${e.message}`)));
        });

        assert_object_equals(position.coords.toJSON(), mockCoords);

        const timestamp = position.timestamp;
        const expectedPosition = {timestamp, coords: mockCoords};
        if (internals.runtimeFlags.approximateGeolocationWebVisibleAPIEnabled) {
        expectedPosition.accuracyMode = 'approximate';
        }
        assert_object_equals(position.toJSON(), expectedPosition);
        }, "Tests toJSON() on GeolocationPosition and GeolocationCoordinates with approximate permission.");
        Antonio Sartori . unresolved

        (nit) There seems to be a lot of duplicated logic here. Maybe you could just have parametrized tests? E.g.

        ```js
        [ true, false ].forEach(isPrecise => {
        promise_test(async () => {
        // ...
        });
        });
        ```

        (feel free to improve e.g. with named params.)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alvin Ji
        • Tom Van Goethem
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
          Gerrit-Change-Number: 7511640
          Gerrit-PatchSet: 10
          Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
          Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
          Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
          Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
          Gerrit-Attention: Tom Van Goethem <t...@chromium.org>
          Gerrit-Attention: Alvin Ji <alv...@chromium.org>
          Gerrit-Comment-Date: Mon, 02 Feb 2026 17:09:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Tom Van Goethem <t...@chromium.org>
          Comment-In-Reply-To: Antonio Sartori <antonio...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Alvin Ji (Gerrit)

          unread,
          Feb 2, 2026, 10:51:34 PM (8 days ago) Feb 2
          to Tom Van Goethem, Antonio Sartori, Chromium Metrics Reviews, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
          Attention needed from Tom Van Goethem

          Alvin Ji voted and added 3 comments

          Votes added by Alvin Ji

          Code-Review+1

          3 comments

          Patchset-level comments
          Alvin Ji . resolved

          LGTM with comments.

          File third_party/blink/renderer/core/html/html_geolocation_element.cc
          Line 110, Patchset 10 (Parent): EqualIgnoringASCIICase(params.new_value, kAccuracyModePrecise));
          Alvin Ji . unresolved

          Should we also remove `kAccuracyModePrecise` if now we don't use it?.

          File third_party/blink/web_tests/wpt_internal/geolocation-api/resources/geolocation-mock.js
          Line 216, Patchset 10 (Latest): setTimeout(() => {this.createGeolocation(receiver, user_gesture)}, 50);
          Alvin Ji . unresolved

          This `setTimeout` call is not reachable in base version of the code. I think we should remove it here.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Tom Van Goethem
          Gerrit-Comment-Date: Tue, 03 Feb 2026 03:51:25 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tom Van Goethem (Gerrit)

          unread,
          Feb 4, 2026, 9:36:25 AM (7 days ago) Feb 4
          to Matt Reynolds, Alvin Ji, Antonio Sartori, Chromium Metrics Reviews, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org

          Tom Van Goethem added 3 comments

          File third_party/blink/renderer/core/html/html_geolocation_element.cc
          Line 110, Patchset 10 (Parent): EqualIgnoringASCIICase(params.new_value, kAccuracyModePrecise));
          Alvin Ji . resolved

          Should we also remove `kAccuracyModePrecise` if now we don't use it?.

          Tom Van Goethem

          It is removed (see line 22). Unless I'm missing something?

          File third_party/blink/web_tests/wpt_internal/geolocation-api/json.https.html

          promise_test(async () => {
          mock.setGeolocationPermission(false, true);
          mock.setGeolocationPosition(mockCoords.latitude,
          mockCoords.longitude,
          mockCoords.accuracy);

          const position = await new Promise((resolve, reject) => {
          navigator.geolocation.getCurrentPosition(
          resolve,
          (e) => reject(new Error(`Error callback invoked unexpectedly: ${e.message}`)));
          });

          assert_object_equals(position.coords.toJSON(), mockCoords);

          const timestamp = position.timestamp;
          const expectedPosition = {timestamp, coords: mockCoords};
          if (internals.runtimeFlags.approximateGeolocationWebVisibleAPIEnabled) {
          expectedPosition.accuracyMode = 'approximate';
          }
          assert_object_equals(position.toJSON(), expectedPosition);
          }, "Tests toJSON() on GeolocationPosition and GeolocationCoordinates with approximate permission.");
          Antonio Sartori . resolved

          (nit) There seems to be a lot of duplicated logic here. Maybe you could just have parametrized tests? E.g.

          ```js
          [ true, false ].forEach(isPrecise => {
          promise_test(async () => {
          // ...
          });
          });
          ```

          (feel free to improve e.g. with named params.)

          Tom Van Goethem

          Done.

          File third_party/blink/web_tests/wpt_internal/geolocation-api/resources/geolocation-mock.js
          Line 216, Patchset 10: setTimeout(() => {this.createGeolocation(receiver, user_gesture)}, 50);
          Alvin Ji . resolved

          This `setTimeout` call is not reachable in base version of the code. I think we should remove it here.

          Tom Van Goethem

          Done

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
            Gerrit-Change-Number: 7511640
            Gerrit-PatchSet: 13
            Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
            Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
            Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
            Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Matt Reynolds <mattre...@chromium.org>
            Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
            Gerrit-Comment-Date: Wed, 04 Feb 2026 14:36:11 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Alvin Ji <alv...@chromium.org>
            Comment-In-Reply-To: Antonio Sartori <antonio...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Tom Van Goethem (Gerrit)

            unread,
            Feb 4, 2026, 9:38:57 AM (7 days ago) Feb 4
            to Dave Tapuska, Colin Blundell, Matt Reynolds, Alvin Ji, Antonio Sartori, Chromium Metrics Reviews, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
            Attention needed from Colin Blundell and Dave Tapuska

            Tom Van Goethem voted Commit-Queue+1

            Commit-Queue+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Colin Blundell
            • Dave Tapuska
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
            Gerrit-Change-Number: 7511640
            Gerrit-PatchSet: 13
            Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
            Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
            Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
            Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
            Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Matt Reynolds <mattre...@chromium.org>
            Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
            Gerrit-Attention: Colin Blundell <blun...@chromium.org>
            Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Comment-Date: Wed, 04 Feb 2026 14:38:40 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Colin Blundell (Gerrit)

            unread,
            Feb 4, 2026, 10:08:46 AM (7 days ago) Feb 4
            to Tom Van Goethem, Colin Blundell, Dave Tapuska, Matt Reynolds, Alvin Ji, Antonio Sartori, Chromium Metrics Reviews, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
            Attention needed from Dave Tapuska and Tom Van Goethem

            Colin Blundell voted and added 1 comment

            Votes added by Colin Blundell

            Code-Review+1

            1 comment

            Patchset-level comments
            File-level comment, Patchset 13 (Latest):
            Colin Blundell . resolved

            Thanks!

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Dave Tapuska
            • Tom Van Goethem
            Gerrit-Attention: Tom Van Goethem <t...@chromium.org>
            Gerrit-Attention: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Comment-Date: Wed, 04 Feb 2026 15:08:31 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Dave Tapuska (Gerrit)

            unread,
            Feb 4, 2026, 10:16:35 AM (7 days ago) Feb 4
            to Tom Van Goethem, Colin Blundell, Matt Reynolds, Alvin Ji, Antonio Sartori, Chromium Metrics Reviews, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org
            Attention needed from Tom Van Goethem

            Dave Tapuska voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Tom Van Goethem
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
            Gerrit-Change-Number: 7511640
            Gerrit-PatchSet: 13
            Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
            Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
            Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
            Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
            Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: Matt Reynolds <mattre...@chromium.org>
            Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
            Gerrit-Attention: Tom Van Goethem <t...@chromium.org>
            Gerrit-Comment-Date: Wed, 04 Feb 2026 15:16:28 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Tom Van Goethem (Gerrit)

            unread,
            Feb 4, 2026, 10:17:37 AM (7 days ago) Feb 4
            to Dave Tapuska, Colin Blundell, Matt Reynolds, Alvin Ji, Antonio Sartori, Chromium Metrics Reviews, Chromium LUCI CQ, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org

            Tom Van Goethem voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention set is empty
            Gerrit-Comment-Date: Wed, 04 Feb 2026 15:17:22 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Chromium LUCI CQ (Gerrit)

            unread,
            Feb 4, 2026, 11:11:50 AM (7 days ago) Feb 4
            to Tom Van Goethem, Dave Tapuska, Colin Blundell, Matt Reynolds, Alvin Ji, Antonio Sartori, Chromium Metrics Reviews, Raphael Kubo da Costa, Kentaro Hara, AyeAye, asvitkine...@chromium.org, kinuko...@chromium.org, permissio...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org

            Chromium LUCI CQ submitted the change

            Change information

            Commit message:
            Introduce accuracyMode for GeolocationPosition

            This CL introduces the accuracyMode attribute when the ApproximateGeolocationPermission feature is enabled.
            Bug: 394756106
            Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
            Reviewed-by: Antonio Sartori <antonio...@chromium.org>
            Reviewed-by: Alvin Ji <alv...@chromium.org>
            Reviewed-by: Colin Blundell <blun...@chromium.org>
            Reviewed-by: Dave Tapuska <dtap...@chromium.org>
            Commit-Queue: Tom Van Goethem <t...@chromium.org>
            Cr-Commit-Position: refs/heads/main@{#1579479}
            Files:
            • M chrome/android/javatests/BUILD.gn
            • A chrome/android/javatests/src/org/chromium/chrome/browser/permissions/ApproximateGeolocationTest.java
            • M content/test/data/android/geolocation.html
            • M services/device/public/java/src/org/chromium/device/geolocation/MockLocationProvider.java
            • M testing/variations/fieldtrial_testing_config.json
            • M third_party/blink/renderer/bindings/generated_in_core.gni
            • M third_party/blink/renderer/core/geolocation/geolocation.cc
            • M third_party/blink/renderer/core/geolocation/geolocation_position.idl
            • M third_party/blink/renderer/core/geolocation/geoposition.cc
            • M third_party/blink/renderer/core/geolocation/geoposition.h
            • M third_party/blink/renderer/core/html/html_geolocation_element.cc
            • M third_party/blink/renderer/platform/runtime_enabled_features.json5
            • M third_party/blink/web_tests/wpt_internal/geolocation-api/json.https.html
            • M third_party/blink/web_tests/wpt_internal/geolocation-api/resources/geolocation-mock.js
            Change size: L
            Delta: 14 files changed, 321 insertions(+), 44 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Colin Blundell, +1 by Antonio Sartori, +1 by Dave Tapuska, +1 by Alvin Ji
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I404480ed513f6447f610dafae4d5df441b5470d5
            Gerrit-Change-Number: 7511640
            Gerrit-PatchSet: 14
            Gerrit-Owner: Tom Van Goethem <t...@chromium.org>
            Gerrit-Reviewer: Alvin Ji <alv...@chromium.org>
            Gerrit-Reviewer: Antonio Sartori <antonio...@chromium.org>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Colin Blundell <blun...@chromium.org>
            Gerrit-Reviewer: Dave Tapuska <dtap...@chromium.org>
            Gerrit-Reviewer: Tom Van Goethem <t...@chromium.org>
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages