Add WPT tests to increase PointerLock coverage [chromium/src : main]

1 view
Skip to first unread message

Gaston Rodriguez (Gerrit)

unread,
Mar 24, 2026, 2:03:35 PMMar 24
to Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Gaston Rodriguez

Message from Gaston Rodriguez

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Gaston Rodriguez
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
Gerrit-Change-Number: 7682773
Gerrit-PatchSet: 4
Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
Gerrit-Attention: Gaston Rodriguez <gas...@microsoft.com>
Gerrit-Comment-Date: Tue, 24 Mar 2026 18:03:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Gaston Rodriguez (Gerrit)

unread,
Mar 24, 2026, 5:45:39 PMMar 24
to Olga Gerchikov, John An, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from John An and Olga Gerchikov

Gaston Rodriguez voted and added 1 comment

Votes added by Gaston Rodriguez

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Gaston Rodriguez . resolved

Hi Olga or John, could you take a look please before I sent it for upstream review?

Open in Gerrit

Related details

Attention is currently required from:
  • John An
  • Olga Gerchikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
Gerrit-Change-Number: 7682773
Gerrit-PatchSet: 4
Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
Gerrit-Reviewer: John An <jo...@microsoft.com>
Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
Gerrit-Attention: John An <jo...@microsoft.com>
Gerrit-Comment-Date: Tue, 24 Mar 2026 21:45:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

John An (Gerrit)

unread,
Mar 27, 2026, 8:31:46 PMMar 27
to Gaston Rodriguez, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Gaston Rodriguez and Olga Gerchikov

John An added 4 comments

Patchset-level comments
John An . resolved

Seems good overall

Commit Message
Line 14, Patchset 4 (Latest): under the cursor (spec §2.1).
John An . unresolved

nit: could you add a link to the spec below? just one is fine.

File third_party/blink/web_tests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock_exit_on_disconnect.html
Line 21, Patchset 4 (Latest): var container = document.getElementById("testContainer");
John An . unresolved

Seems like this isn't doing anything.

Line 52, Patchset 4 (Latest): document.addEventListener('pointerlockerror', function(event) {
John An . unresolved

Why does this test get a pointerlockerror check and not the others?

Open in Gerrit

Related details

Attention is currently required from:
  • Gaston Rodriguez
  • Olga Gerchikov
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
    Gerrit-Change-Number: 7682773
    Gerrit-PatchSet: 4
    Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
    Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
    Gerrit-Reviewer: John An <jo...@microsoft.com>
    Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Gaston Rodriguez <gas...@microsoft.com>
    Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Comment-Date: Sat, 28 Mar 2026 00:31:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Gaston Rodriguez (Gerrit)

    unread,
    Mar 30, 2026, 4:54:29 PMMar 30
    to Olga Gerchikov, John An, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from John An and Olga Gerchikov

    Gaston Rodriguez voted and added 3 comments

    Votes added by Gaston Rodriguez

    Commit-Queue+1

    3 comments

    Commit Message
    Line 14, Patchset 4: under the cursor (spec §2.1).
    John An . resolved

    nit: could you add a link to the spec below? just one is fine.

    Gaston Rodriguez

    Done

    File third_party/blink/web_tests/external/wpt/pointerevents/pointerlock/pointerevent_pointerlock_exit_on_disconnect.html
    Line 21, Patchset 4: var container = document.getElementById("testContainer");
    John An . resolved

    Seems like this isn't doing anything.

    Gaston Rodriguez

    Forgot to delete it after last patch, thanks.

    Line 52, Patchset 4: document.addEventListener('pointerlockerror', function(event) {
    John An . resolved

    Why does this test get a pointerlockerror check and not the others?

    Gaston Rodriguez

    It shouldnt, AFAICT

    Open in Gerrit

    Related details

    Attention is currently required from:
    • John An
    • Olga Gerchikov
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
      Gerrit-Change-Number: 7682773
      Gerrit-PatchSet: 6
      Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
      Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
      Gerrit-Reviewer: John An <jo...@microsoft.com>
      Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: John An <jo...@microsoft.com>
      Gerrit-Comment-Date: Mon, 30 Mar 2026 20:54:19 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: John An <jo...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      John An (Gerrit)

      unread,
      Mar 30, 2026, 4:56:26 PMMar 30
      to Gaston Rodriguez, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Gaston Rodriguez and Olga Gerchikov

      John An added 1 comment

      Patchset-level comments
      File-level comment, Patchset 6 (Latest):
      John An . resolved

      lgtm. moving to cc

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Gaston Rodriguez
      • Olga Gerchikov
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
      Gerrit-Change-Number: 7682773
      Gerrit-PatchSet: 6
      Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
      Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
      Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-CC: John An <jo...@microsoft.com>
      Gerrit-Attention: Gaston Rodriguez <gas...@microsoft.com>
      Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Comment-Date: Mon, 30 Mar 2026 20:56:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mustaq Ahmed (Gerrit)

      unread,
      Jun 11, 2026, 12:18:07 PMJun 11
      to Gaston Rodriguez, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from Gaston Rodriguez and Olga Gerchikov

      Mustaq Ahmed added 2 comments

      Patchset-level comments
      File-level comment, Patchset 8 (Latest):
      Mustaq Ahmed . unresolved

      Thanks for checking the coverage here.

      • Have you checked possible dups in `external/wpt/pointerlock/`?
      • Please move the new WPTs to the above folders whenever the test doesn't involve PointerEvents spec (e.g. the one for bubbling event).
      Commit Message
      Line 27, Patchset 8 (Latest):The pointerlock spec is defined in https://www.w3.org/TR/pointerlock-2/
      Mustaq Ahmed . unresolved

      Please link to the latest editor's draft instead.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Gaston Rodriguez
      • Olga Gerchikov
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
        Gerrit-Change-Number: 7682773
        Gerrit-PatchSet: 8
        Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
        Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
        Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
        Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-CC: John An <jo...@microsoft.com>
        Gerrit-Attention: Gaston Rodriguez <gas...@microsoft.com>
        Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-Comment-Date: Thu, 11 Jun 2026 16:17:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Gaston Rodriguez (Gerrit)

        unread,
        Jun 12, 2026, 12:08:19 PMJun 12
        to Mustaq Ahmed, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
        Attention needed from Mustaq Ahmed and Olga Gerchikov

        Gaston Rodriguez added 2 comments

        Patchset-level comments
        File-level comment, Patchset 8:
        Mustaq Ahmed . resolved

        Thanks for checking the coverage here.

        • Have you checked possible dups in `external/wpt/pointerlock/`?
        • Please move the new WPTs to the above folders whenever the test doesn't involve PointerEvents spec (e.g. the one for bubbling event).
        Gaston Rodriguez

        Turns out I had missed checking that directory. There were two tests that covered similar concerns, I migrated my logic into them and expanded what already existed.
        I also moved most of them into `wpt/pointerlock`. Thanks!

        Commit Message
        Line 27, Patchset 8:The pointerlock spec is defined in https://www.w3.org/TR/pointerlock-2/
        Mustaq Ahmed . resolved

        Please link to the latest editor's draft instead.

        Gaston Rodriguez

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Mustaq Ahmed
        • Olga Gerchikov
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
          Gerrit-Change-Number: 7682773
          Gerrit-PatchSet: 10
          Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
          Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
          Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
          Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-CC: John An <jo...@microsoft.com>
          Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-Attention: Mustaq Ahmed <mus...@chromium.org>
          Gerrit-Comment-Date: Fri, 12 Jun 2026 16:08:06 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Mustaq Ahmed <mus...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Gaston Rodriguez (Gerrit)

          unread,
          Jun 12, 2026, 1:08:01 PMJun 12
          to Mustaq Ahmed, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
          Attention needed from Mustaq Ahmed and Olga Gerchikov

          Gaston Rodriguez added 1 comment

          Patchset-level comments
          Mustaq Ahmed . resolved

          Thanks for checking the coverage here.

          • Have you checked possible dups in `external/wpt/pointerlock/`?
          • Please move the new WPTs to the above folders whenever the test doesn't involve PointerEvents spec (e.g. the one for bubbling event).
          Gaston Rodriguez

          Turns out I had missed checking that directory. There were two tests that covered similar concerns, I migrated my logic into them and expanded what already existed.
          I also moved most of them into `wpt/pointerlock`. Thanks!

          Gaston Rodriguez

          Ended up moving all of them after further review.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Mustaq Ahmed
          • Olga Gerchikov
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
          Gerrit-Change-Number: 7682773
          Gerrit-PatchSet: 12
          Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
          Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
          Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
          Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-CC: John An <jo...@microsoft.com>
          Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-Attention: Mustaq Ahmed <mus...@chromium.org>
          Gerrit-Comment-Date: Fri, 12 Jun 2026 17:07:47 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Gaston Rodriguez <gas...@microsoft.com>
          Comment-In-Reply-To: Mustaq Ahmed <mus...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Mustaq Ahmed (Gerrit)

          unread,
          Jun 15, 2026, 1:20:12 PM (13 days ago) Jun 15
          to Gaston Rodriguez, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
          Attention needed from Gaston Rodriguez and Olga Gerchikov

          Mustaq Ahmed added 11 comments

          Patchset-level comments
          File-level comment, Patchset 12 (Latest):
          Mustaq Ahmed . resolved

          Nice, thanks for improving the test coverage for PointerLock and also checking for coverage overlap. I asked for a few minor changes in the second test, a rename, and the consideration to avoiding counting (possibly through another CL).

          File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_promise.html
          Line 17, Patchset 12 (Latest): // Test 1: requestPointerLock() promise resolves on success
          Mustaq Ahmed . unresolved

          Nit: I would skip the test numbers to ease adding future tests in-between or moving tests. I personally prefer better `promise_test` label over such comment blocks but that's subjective.

          Line 31, Patchset 12 (Latest): // Set up listener BEFORE requesting lock so we consume
          Mustaq Ahmed . unresolved

          The use of "consume" seems confusing to me, as if we can have at most one listener. I would suggest "to be able to handle...".

          Line 60, Patchset 12 (Latest): }, "requestPointerLock() promise resolves on success");
          Mustaq Ahmed . unresolved

          "requestPointerLock() and exitPointerLock promises resolve on success"?

          Line 62, Patchset 12 (Latest): // Test 2: exitPointerLock() when not locked is a no-op.
          Mustaq Ahmed . unresolved

          Ditto.

          Line 69, Patchset 12 (Latest): var eventFired = false;
          var handler = function() {
          eventFired = true;
          };
          Mustaq Ahmed . unresolved
          Let's make the error message more precise about which event has fired, and omit the Boolean:
          ```js
          var handler = e => assert_unreached(`Unexpected firing of ${e.type}`);
          ```
          Line 90, Patchset 12 (Latest): // Test 3: pointerlockchange event does not bubble and is not
          Mustaq Ahmed . unresolved

          Ditto.

          Line 119, Patchset 12 (Latest): assert_false(lockEvent.bubbles,
          Mustaq Ahmed . unresolved

          Please add an assert that `lockEvent` is not undefined, to avoid an uncaught reference error.

          Line 138, Patchset 12 (Latest): assert_false(unlockEvent.bubbles,
          Mustaq Ahmed . unresolved

          Same.

          File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_remove_target.html
          Line 16, Patchset 12 (Latest): var lock_change_count = 0;
          Mustaq Ahmed . unresolved

          The use of `lock_change_count` makes this test harder to follow compared to the test above because the test logic is scattered across multiple handlers. Can't we avoid this counting and instead rely on `await lockChangePromise` like your test above?

          Same for all tests using this counter.

          Alternatively you can rewrite these tests through a separate CL after this lands. Your call.

          File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_suppress_compat_events_when_locked.html
          Line 22, Patchset 12 (Latest): const kSuppressedEvents = ['mouseenter', 'mouseleave', 'mouseover',
          Mustaq Ahmed . unresolved

          Please rename the test and text inside to avoid "compat mouse event". The suppressed events here are the boundary events, and "compat mouse events" are related to PointerEvents and unrelated to PointerLock.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Gaston Rodriguez
          • Olga Gerchikov
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
            Gerrit-Change-Number: 7682773
            Gerrit-PatchSet: 12
            Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
            Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
            Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
            Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
            Gerrit-CC: John An <jo...@microsoft.com>
            Gerrit-Attention: Gaston Rodriguez <gas...@microsoft.com>
            Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
            Gerrit-Comment-Date: Mon, 15 Jun 2026 17:19:53 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Gaston Rodriguez (Gerrit)

            unread,
            Jun 16, 2026, 11:26:24 AM (12 days ago) Jun 16
            to Mustaq Ahmed, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
            Attention needed from Mustaq Ahmed and Olga Gerchikov

            Gaston Rodriguez added 10 comments

            File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_promise.html
            Line 17, Patchset 12: // Test 1: requestPointerLock() promise resolves on success
            Mustaq Ahmed . resolved

            Nit: I would skip the test numbers to ease adding future tests in-between or moving tests. I personally prefer better `promise_test` label over such comment blocks but that's subjective.

            Gaston Rodriguez

            I agree, removed the comments and improved the label where appropriate.

            Line 31, Patchset 12: // Set up listener BEFORE requesting lock so we consume
            Mustaq Ahmed . resolved

            The use of "consume" seems confusing to me, as if we can have at most one listener. I would suggest "to be able to handle...".

            Gaston Rodriguez

            Done

            Line 60, Patchset 12: }, "requestPointerLock() promise resolves on success");
            Mustaq Ahmed . resolved

            "requestPointerLock() and exitPointerLock promises resolve on success"?

            Gaston Rodriguez

            Done

            Line 62, Patchset 12: // Test 2: exitPointerLock() when not locked is a no-op.
            Mustaq Ahmed . resolved

            Ditto.

            Gaston Rodriguez

            Done

            Line 69, Patchset 12: var eventFired = false;

            var handler = function() {
            eventFired = true;
            };
            Mustaq Ahmed . resolved
            Let's make the error message more precise about which event has fired, and omit the Boolean:
            ```js
            var handler = e => assert_unreached(`Unexpected firing of ${e.type}`);
            ```
            Gaston Rodriguez

            Nice.

            Line 90, Patchset 12: // Test 3: pointerlockchange event does not bubble and is not
            Mustaq Ahmed . resolved

            Ditto.

            Gaston Rodriguez

            Done

            Line 119, Patchset 12: assert_false(lockEvent.bubbles,
            Mustaq Ahmed . resolved

            Please add an assert that `lockEvent` is not undefined, to avoid an uncaught reference error.

            Gaston Rodriguez

            Done

            Line 138, Patchset 12: assert_false(unlockEvent.bubbles,
            Mustaq Ahmed . resolved

            Same.

            Gaston Rodriguez

            Done

            File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_remove_target.html
            Line 16, Patchset 12: var lock_change_count = 0;
            Mustaq Ahmed . resolved

            The use of `lock_change_count` makes this test harder to follow compared to the test above because the test logic is scattered across multiple handlers. Can't we avoid this counting and instead rely on `await lockChangePromise` like your test above?

            Same for all tests using this counter.

            Alternatively you can rewrite these tests through a separate CL after this lands. Your call.

            Gaston Rodriguez

            I rewrote the tests to use the sequential model. It's more readable, thanks!

            File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_suppress_compat_events_when_locked.html
            Line 22, Patchset 12: const kSuppressedEvents = ['mouseenter', 'mouseleave', 'mouseover',
            Mustaq Ahmed . resolved

            Please rename the test and text inside to avoid "compat mouse event". The suppressed events here are the boundary events, and "compat mouse events" are related to PointerEvents and unrelated to PointerLock.

            Gaston Rodriguez

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Mustaq Ahmed
            • Olga Gerchikov
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
              Gerrit-Change-Number: 7682773
              Gerrit-PatchSet: 17
              Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
              Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
              Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
              Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
              Gerrit-CC: John An <jo...@microsoft.com>
              Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
              Gerrit-Attention: Mustaq Ahmed <mus...@chromium.org>
              Gerrit-Comment-Date: Tue, 16 Jun 2026 15:26:15 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Mustaq Ahmed <mus...@chromium.org>
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Gaston Rodriguez (Gerrit)

              unread,
              Jun 16, 2026, 11:28:59 AM (12 days ago) Jun 16
              to Mustaq Ahmed, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
              Attention needed from Mustaq Ahmed and Olga Gerchikov

              Gaston Rodriguez added 1 comment

              File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_remove_target.html
              Line 16, Patchset 12: var lock_change_count = 0;
              Mustaq Ahmed . resolved

              The use of `lock_change_count` makes this test harder to follow compared to the test above because the test logic is scattered across multiple handlers. Can't we avoid this counting and instead rely on `await lockChangePromise` like your test above?

              Same for all tests using this counter.

              Alternatively you can rewrite these tests through a separate CL after this lands. Your call.

              Gaston Rodriguez

              I rewrote the tests to use the sequential model. It's more readable, thanks!

              Gaston Rodriguez

              Also, the latest version is 200 lines smaller than the one you commented on. Much better (:

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Mustaq Ahmed
              • Olga Gerchikov
              Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
              Gerrit-Change-Number: 7682773
              Gerrit-PatchSet: 18
              Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
              Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
              Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
              Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
              Gerrit-CC: John An <jo...@microsoft.com>
              Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
              Gerrit-Attention: Mustaq Ahmed <mus...@chromium.org>
              Gerrit-Comment-Date: Tue, 16 Jun 2026 15:28:44 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Mustaq Ahmed (Gerrit)

              unread,
              Jun 16, 2026, 12:01:49 PM (12 days ago) Jun 16
              to Gaston Rodriguez, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
              Attention needed from Gaston Rodriguez and Olga Gerchikov

              Mustaq Ahmed voted and added 3 comments

              Votes added by Mustaq Ahmed

              Code-Review+1

              3 comments

              Patchset-level comments
              File-level comment, Patchset 18 (Latest):
              Mustaq Ahmed . resolved

              Awesome, thanks for cutting 200 lines and improve readability!

              File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_all_mouse_events_to_locktarget.html
              Line 62, Patchset 18 (Latest): "Events fired: [" + events_on_other.join(", ") + "]");
              Mustaq Ahmed . unresolved

              Nit: I think `assert_array_equals` emits the array content when fails. If this is correct, the last part of the string could be removed.

              File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_remove_target.html
              Line 16, Patchset 12: var lock_change_count = 0;
              Mustaq Ahmed . resolved

              The use of `lock_change_count` makes this test harder to follow compared to the test above because the test logic is scattered across multiple handlers. Can't we avoid this counting and instead rely on `await lockChangePromise` like your test above?

              Same for all tests using this counter.

              Alternatively you can rewrite these tests through a separate CL after this lands. Your call.

              Gaston Rodriguez

              I rewrote the tests to use the sequential model. It's more readable, thanks!

              Gaston Rodriguez

              Also, the latest version is 200 lines smaller than the one you commented on. Much better (:

              Mustaq Ahmed

              Woot!

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Gaston Rodriguez
              • Olga Gerchikov
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement 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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
                Gerrit-Change-Number: 7682773
                Gerrit-PatchSet: 18
                Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
                Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
                Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
                Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
                Gerrit-CC: John An <jo...@microsoft.com>
                Gerrit-Attention: Gaston Rodriguez <gas...@microsoft.com>
                Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
                Gerrit-Comment-Date: Tue, 16 Jun 2026 16:01:26 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Gaston Rodriguez (Gerrit)

                unread,
                Jun 17, 2026, 4:48:43 PM (11 days ago) Jun 17
                to kokoro, Mustaq Ahmed, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
                Attention needed from Olga Gerchikov

                Gaston Rodriguez added 1 comment

                File third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_all_mouse_events_to_locktarget.html
                Line 62, Patchset 18: "Events fired: [" + events_on_other.join(", ") + "]");
                Mustaq Ahmed . resolved

                Nit: I think `assert_array_equals` emits the array content when fails. If this is correct, the last part of the string could be removed.

                Gaston Rodriguez

                I just double checked and you're right, removed this line.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Olga Gerchikov
                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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
                  Gerrit-Change-Number: 7682773
                  Gerrit-PatchSet: 19
                  Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
                  Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-CC: John An <jo...@microsoft.com>
                  Gerrit-CC: kokoro <noreply...@google.com>
                  Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-Comment-Date: Wed, 17 Jun 2026 20:48:34 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Mustaq Ahmed <mus...@chromium.org>
                  satisfied_requirement
                  open
                  diffy

                  Gaston Rodriguez (Gerrit)

                  unread,
                  Jun 17, 2026, 4:48:52 PM (11 days ago) Jun 17
                  to kokoro, Mustaq Ahmed, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
                  Attention needed from Olga Gerchikov

                  Gaston Rodriguez voted Commit-Queue+2

                  Commit-Queue+2
                  Gerrit-Comment-Date: Wed, 17 Jun 2026 20:48:40 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  open
                  diffy

                  Blink W3C Test Autoroller (Gerrit)

                  unread,
                  Jun 17, 2026, 5:03:07 PM (11 days ago) Jun 17
                  to Gaston Rodriguez, kokoro, Mustaq Ahmed, John An, Olga Gerchikov, Chromium LUCI CQ, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
                  Attention needed from Olga Gerchikov

                  Message from Blink W3C Test Autoroller

                  Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/60707.

                  When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.

                  WPT Export docs:
                  https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Olga Gerchikov
                  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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
                  Gerrit-Change-Number: 7682773
                  Gerrit-PatchSet: 19
                  Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
                  Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
                  Gerrit-CC: John An <jo...@microsoft.com>
                  Gerrit-CC: kokoro <noreply...@google.com>
                  Gerrit-Attention: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-Comment-Date: Wed, 17 Jun 2026 21:02:54 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  open
                  diffy

                  Chromium LUCI CQ (Gerrit)

                  unread,
                  Jun 17, 2026, 6:16:13 PM (11 days ago) Jun 17
                  to Gaston Rodriguez, Blink W3C Test Autoroller, kokoro, Mustaq Ahmed, John An, Olga Gerchikov, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

                  Chromium LUCI CQ submitted the change with unreviewed changes

                  Unreviewed changes

                  18 is the latest approved patch-set.
                  The change was submitted with unreviewed changes in the following files:

                  ```
                  The name of the file: third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_all_mouse_events_to_locktarget.html
                  Insertions: 1, Deletions: 2.

                  @@ -58,8 +58,7 @@
                  assert_true(events_on_target.includes('click'),
                  "click should fire on lock target.");
                  assert_array_equals(events_on_other, [],
                  - "No mouse events should fire on non-lock-target element. " +
                  - "Events fired: [" + events_on_other.join(", ") + "]");
                  + "No mouse events should fire on non-lock-target element.");
                  }, "mousedown, mouseup, click events go to the lock target");
                  </script>
                  </html>
                  ```

                  Change information

                  Commit message:
                  Add WPT tests to increase PointerLock coverage

                  New tests in wpt/pointerlock/:

                  - pointerlock_all_mouse_events_to_locktarget: verifies that mouse events are routed to the lock target element and not the element under the cursor (spec §2.1).
                  - pointerlock_suppress_mouse_boundary_events_when_locked.html: verifies that mouse boundary events (out, leave, etc) do not fire while the pointer is locked (spec §2.1).
                  - pointerlock_target_change: verifies that calling requestPointerLock() on a different element while already locked changes the lock target, fires pointerlockchange, and that subsequent pointermove events are dispatched to the new lock target (spec §3 step 6.2, plus Pointer Events routing during lock).
                  - pointerlock_api_behavior: verifies miscellaneous behaviours of calling pointerlock functions. Has two tests: (a) exitPointerLock() is a no-op when not locked, and (b) the pointerlockchange event fired by the UA matches spec (does not bubble, is not cancelable, targets the document) (spec §2.3, §3, §4).

                  Replaced/strengthened test in wpt/pointerlock/:

                  - pointerlock_remove_target: replaces the previous manual-style test with an automated version that verifies pointer lock exits when the locked element is removed from the DOM (spec §8).

                  The pointerlock spec is defined in https://w3c.github.io/pointerlock/
                  Bug: 521748207
                  Change-Id: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
                  Commit-Queue: Gaston Rodriguez <gas...@microsoft.com>
                  Reviewed-by: Mustaq Ahmed <mus...@chromium.org>
                  Cr-Commit-Position: refs/heads/main@{#1648623}
                  Files:
                  • A third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_all_mouse_events_to_locktarget.html
                  • A third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_api_behavior.html
                  • M third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_remove_target.html
                  • A third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_suppress_mouse_boundary_events_when_locked.html
                  • A third_party/blink/web_tests/external/wpt/pointerlock/pointerlock_target_change.html
                  • A third_party/blink/web_tests/external/wpt/pointerlock/test-helper.js
                  Change size: L
                  Delta: 6 files changed, 370 insertions(+), 89 deletions(-)
                  Branch: refs/heads/main
                  Submit Requirements:
                  • requirement satisfiedCode-Review: +1 by Mustaq Ahmed
                  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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
                  Gerrit-Change-Number: 7682773
                  Gerrit-PatchSet: 20
                  Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                  Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
                  Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
                  open
                  diffy
                  satisfied_requirement

                  Blink W3C Test Autoroller (Gerrit)

                  unread,
                  Jun 18, 2026, 12:42:09 AM (11 days ago) Jun 18
                  to Gaston Rodriguez, Chromium LUCI CQ, kokoro, Mustaq Ahmed, John An, Olga Gerchikov, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org

                  Message from Blink W3C Test Autoroller

                  The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/60707

                  Open in Gerrit

                  Related details

                  Attention set is empty
                  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: I0ec1359afb99bab94aa8d4bf9fb10a40075b58bd
                  Gerrit-Change-Number: 7682773
                  Gerrit-PatchSet: 20
                  Gerrit-Owner: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                  Gerrit-Reviewer: Gaston Rodriguez <gas...@microsoft.com>
                  Gerrit-Reviewer: Mustaq Ahmed <mus...@chromium.org>
                  Gerrit-Reviewer: Olga Gerchikov <gerc...@microsoft.com>
                  Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
                  Gerrit-CC: John An <jo...@microsoft.com>
                  Gerrit-CC: kokoro <noreply...@google.com>
                  Gerrit-Comment-Date: Thu, 18 Jun 2026 04:41:56 +0000
                  Gerrit-HasComments: No
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  open
                  diffy
                  Reply all
                  Reply to author
                  Forward
                  0 new messages