[actor] Support coordinate TOCTOU for all window types. [chromium/src : main]

0 views
Skip to first unread message

Mark Foltz (Gerrit)

unread,
May 20, 2026, 2:29:46 PM (8 days ago) May 20
to Mark Foltz, David Bokan, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from David Bokan

Mark Foltz added 2 comments

File chrome/renderer/actor/tool_base.cc
Line 324, Patchset 8: if (target_node.IsNull()) {
Mark Foltz . unresolved

@bokan: I wasn't sure if this was necessary; the target_node should come from a hit test result in Blink IIUC. But we don't want to pass an `IsNull()` target_node to `observed_target_node.ContainsViaFlatTree` below.

Line 379, Patchset 8: if (hit_element.IsNull()) {
Mark Foltz . unresolved

Similar question here, can a hit test return a null WebElement?

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
Gerrit-Change-Number: 7814741
Gerrit-PatchSet: 11
Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Wed, 20 May 2026 18:29:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Bokan (Gerrit)

unread,
May 26, 2026, 5:23:00 PM (2 days ago) May 26
to Mark Foltz, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Mark Foltz

David Bokan voted and added 5 comments

Votes added by David Bokan

Code-Review+1

5 comments

Commit Message
Line 14, Patchset 11 (Latest):- Guard the ActorTabData access in RequestTabObservation() with a null
David Bokan . unresolved

Given the point above, when does this happen?

Line 23, Patchset 11 (Latest):- Shorten kActorObservationDelayTimeout in GlicActorUiTest to 1s to
prevent test timeouts on slow or headless test bots.
David Bokan . unresolved

Can you elaborate on how this fixes the issue? Won't this likely lead to more flakiness as tests now unintentionally hit the now-shorter kActorObservationDelayTimeout?

File chrome/browser/glic/host/glic_actor_scroll_to_tool_interactive_uitest.cc
Line 24, Patchset 11 (Latest): // Disable TOCTOU validation because these tests do not populate
// observed_target in MakeScrollTo, which would cause validation to fail
David Bokan . unresolved

hmm, tests shouldn't have to manually populate this. observed_target is computed in the browser as part of executing an action [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/actor/tools/page_tool.cc;l=496;drc=94b8dff8418534977a39c201e209e2efc30b48d7).

These tests call GetPageContextForActorTab which [should set](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=663;drc=94b8dff8418534977a39c201e209e2efc30b48d7) `last_observed_page_content` on the ActorTabData and the tests below inject an action using ExecuteAction which starts their journey at the [Glic API layer](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=128;drc=94b8dff8418534977a39c201e209e2efc30b48d7) so I would expect that this should work? Is there something else going on here or am I missing something?

File chrome/renderer/actor/tool_base.cc
Line 324, Patchset 8: if (target_node.IsNull()) {
Mark Foltz . unresolved

@bokan: I wasn't sure if this was necessary; the target_node should come from a hit test result in Blink IIUC. But we don't want to pass an `IsNull()` target_node to `observed_target_node.ContainsViaFlatTree` below.

David Bokan

The [comment](https://source.chromium.org/chromium/chromium/src/+/main:chrome/renderer/actor/tool_base.h;l=35;drc=73cf19fa4199ab7f2874f58cc7eda83261f017f5) in the header file says this can be null but I don't think it can. When the comment and struct were [added](https://chromium-review.git.corp.google.com/c/chromium/src/+/6684992) I think this _could_ be null but not for the reason the comment says - we null checked and returned base::unexpected if the DOMNodeId was not found - but because a coordinate hit test was extracted using GetElement. I believe Blink hit tests will always return DocumentNode as a last resort so GetElement would return null. But we [now](https://source.chromium.org/chromium/chromium/src/+/main:chrome/renderer/actor/tool_base.cc;l=168;drc=63ec5d57642d302b1f2be8207a6672edd989c034) use `GetNodeOrPseudoNode` which _I think_ should never return a null WebNode. That said, that's a hard expectation to verify visually so I'm not opposed to leaving the guard in place

Line 379, Patchset 8: if (hit_element.IsNull()) {
Mark Foltz . unresolved

Similar question here, can a hit test return a null WebElement?

David Bokan

yes, if you hit outside of any elements (e.g. document scrollbars IIRC or outside the <html> element) then you'd get the DocumentNode which is null in GetElement

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Foltz
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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
    Gerrit-Change-Number: 7814741
    Gerrit-PatchSet: 11
    Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
    Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
    Gerrit-Comment-Date: Tue, 26 May 2026 21:22:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Mark Foltz <mfo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mark Foltz (Gerrit)

    unread,
    May 27, 2026, 4:41:37 PM (yesterday) May 27
    to Mark Foltz, David Bokan, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from David Bokan

    Mark Foltz voted and added 5 comments

    Votes added by Mark Foltz

    Commit-Queue+1

    5 comments

    Commit Message
    Line 14, Patchset 11:- Guard the ActorTabData access in RequestTabObservation() with a null
    David Bokan . resolved

    Given the point above, when does this happen?

    Mark Foltz

    Good catch, it doesn't. I reverted this change to ActorKeyedService.

    Line 23, Patchset 11:- Shorten kActorObservationDelayTimeout in GlicActorUiTest to 1s to

    prevent test timeouts on slow or headless test bots.
    David Bokan . resolved

    Can you elaborate on how this fixes the issue? Won't this likely lead to more flakiness as tests now unintentionally hit the now-shorter kActorObservationDelayTimeout?

    Mark Foltz

    Waiting the full, default 10s for the page to settle was causing some tests to hit test timeouts of 45s. The test pages themselves are very simple and should be stable in less than 1s, but something was causing page stability not to return.

    I'll increase this to 3s to try to find a balance here.

    File chrome/browser/glic/host/glic_actor_scroll_to_tool_interactive_uitest.cc
    Line 24, Patchset 11: // Disable TOCTOU validation because these tests do not populate

    // observed_target in MakeScrollTo, which would cause validation to fail
    David Bokan . resolved

    hmm, tests shouldn't have to manually populate this. observed_target is computed in the browser as part of executing an action [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/actor/tools/page_tool.cc;l=496;drc=94b8dff8418534977a39c201e209e2efc30b48d7).

    These tests call GetPageContextForActorTab which [should set](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=663;drc=94b8dff8418534977a39c201e209e2efc30b48d7) `last_observed_page_content` on the ActorTabData and the tests below inject an action using ExecuteAction which starts their journey at the [Glic API layer](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=128;drc=94b8dff8418534977a39c201e209e2efc30b48d7) so I would expect that this should work? Is there something else going on here or am I missing something?

    Mark Foltz

    After more digging the problem is the tests that use `ExecuteScrollToActionWithNodeId`. This helper extracts a nodeId directly from the DOM and attempts to scroll to DOM nodes that are not represented in the APC. Attempting TOCTOU on these actions is bound to fail.

    This tool seems to be incompatible with actor's implementation of TOCTOU and maybe there should be a tool-specific way to opt out. For now I have restructured the test to disable TOCTOU for those tests specifically.

    File chrome/renderer/actor/tool_base.cc
    Line 324, Patchset 8: if (target_node.IsNull()) {
    Mark Foltz . resolved

    @bokan: I wasn't sure if this was necessary; the target_node should come from a hit test result in Blink IIUC. But we don't want to pass an `IsNull()` target_node to `observed_target_node.ContainsViaFlatTree` below.

    David Bokan

    The [comment](https://source.chromium.org/chromium/chromium/src/+/main:chrome/renderer/actor/tool_base.h;l=35;drc=73cf19fa4199ab7f2874f58cc7eda83261f017f5) in the header file says this can be null but I don't think it can. When the comment and struct were [added](https://chromium-review.git.corp.google.com/c/chromium/src/+/6684992) I think this _could_ be null but not for the reason the comment says - we null checked and returned base::unexpected if the DOMNodeId was not found - but because a coordinate hit test was extracted using GetElement. I believe Blink hit tests will always return DocumentNode as a last resort so GetElement would return null. But we [now](https://source.chromium.org/chromium/chromium/src/+/main:chrome/renderer/actor/tool_base.cc;l=168;drc=63ec5d57642d302b1f2be8207a6672edd989c034) use `GetNodeOrPseudoNode` which _I think_ should never return a null WebNode. That said, that's a hard expectation to verify visually so I'm not opposed to leaving the guard in place

    Mark Foltz

    OK, it sounds like I should leave this null check in.

    If you want I can add a temporary DCHECK here that will generate a crash report if we hit this case in the wild, but then you'll need to check for reports and followup 😊

    Line 379, Patchset 8: if (hit_element.IsNull()) {
    Mark Foltz . resolved

    Similar question here, can a hit test return a null WebElement?

    David Bokan

    yes, if you hit outside of any elements (e.g. document scrollbars IIRC or outside the <html> element) then you'd get the DocumentNode which is null in GetElement

    Mark Foltz

    Leaving this check in.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Bokan
    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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
      Gerrit-Change-Number: 7814741
      Gerrit-PatchSet: 13
      Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Comment-Date: Wed, 27 May 2026 20:41:31 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Mark Foltz <mfo...@chromium.org>
      Comment-In-Reply-To: David Bokan <bo...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mark Foltz (Gerrit)

      unread,
      May 27, 2026, 4:42:18 PM (yesterday) May 27
      to Mark Foltz, Alison Gale, David Bokan, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Alison Gale and David Bokan

      Mark Foltz added 1 comment

      Patchset-level comments
      File-level comment, Patchset 13 (Latest):
      Mark Foltz . resolved

      +agale@ for tab_features.cc

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alison Gale
      • David Bokan
      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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
      Gerrit-Change-Number: 7814741
      Gerrit-PatchSet: 13
      Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
      Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Attention: Alison Gale <ag...@chromium.org>
      Gerrit-Comment-Date: Wed, 27 May 2026 20:42:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      David Bokan (Gerrit)

      unread,
      May 27, 2026, 4:52:12 PM (yesterday) May 27
      to Mark Foltz, Alison Gale, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Alison Gale and Mark Foltz

      David Bokan voted and added 2 comments

      Votes added by David Bokan

      Code-Review+1

      2 comments

      Commit Message
      Line 23, Patchset 11:- Shorten kActorObservationDelayTimeout in GlicActorUiTest to 1s to
      prevent test timeouts on slow or headless test bots.
      David Bokan . unresolved

      Can you elaborate on how this fixes the issue? Won't this likely lead to more flakiness as tests now unintentionally hit the now-shorter kActorObservationDelayTimeout?

      Mark Foltz

      Waiting the full, default 10s for the page to settle was causing some tests to hit test timeouts of 45s. The test pages themselves are very simple and should be stable in less than 1s, but something was causing page stability not to return.

      I'll increase this to 3s to try to find a balance here.

      David Bokan

      Ack - might be good to include a comment explaining why we're using the shortened delay in tests and that if that's fixed we could use the normal timeouts in tests too.

      File chrome/browser/glic/host/glic_actor_scroll_to_tool_interactive_uitest.cc
      Line 24, Patchset 11: // Disable TOCTOU validation because these tests do not populate
      // observed_target in MakeScrollTo, which would cause validation to fail
      David Bokan . unresolved

      hmm, tests shouldn't have to manually populate this. observed_target is computed in the browser as part of executing an action [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/actor/tools/page_tool.cc;l=496;drc=94b8dff8418534977a39c201e209e2efc30b48d7).

      These tests call GetPageContextForActorTab which [should set](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=663;drc=94b8dff8418534977a39c201e209e2efc30b48d7) `last_observed_page_content` on the ActorTabData and the tests below inject an action using ExecuteAction which starts their journey at the [Glic API layer](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=128;drc=94b8dff8418534977a39c201e209e2efc30b48d7) so I would expect that this should work? Is there something else going on here or am I missing something?

      Mark Foltz

      After more digging the problem is the tests that use `ExecuteScrollToActionWithNodeId`. This helper extracts a nodeId directly from the DOM and attempts to scroll to DOM nodes that are not represented in the APC. Attempting TOCTOU on these actions is bound to fail.

      This tool seems to be incompatible with actor's implementation of TOCTOU and maybe there should be a tool-specific way to opt out. For now I have restructured the test to disable TOCTOU for those tests specifically.

      David Bokan

      Ah, I'm not sure it's specific to the tool. If the elements we're targeting here aren't added to APC (e.g. because they're not actionable / have no content?) then I think that's a test-bug, scroll_to should only be used to target things nodes in the cached APC.

      Some tests are checking for things like "the specified DOMNodeId doesn't exist" which could happen in the real world cases, either because of an error server-side or because the page removed the DOMNodeID (in which case it should exist in cached APC).

      I think the ideal fix would be to ensure the targeted nodes are put into the cached APC but I wouldn't block on this - maybe just leave a note?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alison Gale
      • Mark Foltz
      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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
        Gerrit-Change-Number: 7814741
        Gerrit-PatchSet: 13
        Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
        Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
        Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
        Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
        Gerrit-Attention: Alison Gale <ag...@chromium.org>
        Gerrit-Comment-Date: Wed, 27 May 2026 20:52:06 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mark Foltz (Gerrit)

        unread,
        May 27, 2026, 7:59:27 PM (21 hours ago) May 27
        to Mark Foltz, David Bokan, Alison Gale, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Alison Gale

        Mark Foltz voted and added 2 comments

        Votes added by Mark Foltz

        Commit-Queue+1

        2 comments

        Commit Message
        Line 23, Patchset 11:- Shorten kActorObservationDelayTimeout in GlicActorUiTest to 1s to
        prevent test timeouts on slow or headless test bots.
        David Bokan . resolved

        Can you elaborate on how this fixes the issue? Won't this likely lead to more flakiness as tests now unintentionally hit the now-shorter kActorObservationDelayTimeout?

        Mark Foltz

        Waiting the full, default 10s for the page to settle was causing some tests to hit test timeouts of 45s. The test pages themselves are very simple and should be stable in less than 1s, but something was causing page stability not to return.

        I'll increase this to 3s to try to find a balance here.

        David Bokan

        Ack - might be good to include a comment explaining why we're using the shortened delay in tests and that if that's fixed we could use the normal timeouts in tests too.

        Mark Foltz

        Done - added a comment where I set the timeout.

        File chrome/browser/glic/host/glic_actor_scroll_to_tool_interactive_uitest.cc
        Line 24, Patchset 11: // Disable TOCTOU validation because these tests do not populate
        // observed_target in MakeScrollTo, which would cause validation to fail
        David Bokan . resolved

        hmm, tests shouldn't have to manually populate this. observed_target is computed in the browser as part of executing an action [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/actor/tools/page_tool.cc;l=496;drc=94b8dff8418534977a39c201e209e2efc30b48d7).

        These tests call GetPageContextForActorTab which [should set](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=663;drc=94b8dff8418534977a39c201e209e2efc30b48d7) `last_observed_page_content` on the ActorTabData and the tests below inject an action using ExecuteAction which starts their journey at the [Glic API layer](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=128;drc=94b8dff8418534977a39c201e209e2efc30b48d7) so I would expect that this should work? Is there something else going on here or am I missing something?

        Mark Foltz

        After more digging the problem is the tests that use `ExecuteScrollToActionWithNodeId`. This helper extracts a nodeId directly from the DOM and attempts to scroll to DOM nodes that are not represented in the APC. Attempting TOCTOU on these actions is bound to fail.

        This tool seems to be incompatible with actor's implementation of TOCTOU and maybe there should be a tool-specific way to opt out. For now I have restructured the test to disable TOCTOU for those tests specifically.

        David Bokan

        Ah, I'm not sure it's specific to the tool. If the elements we're targeting here aren't added to APC (e.g. because they're not actionable / have no content?) then I think that's a test-bug, scroll_to should only be used to target things nodes in the cached APC.

        Some tests are checking for things like "the specified DOMNodeId doesn't exist" which could happen in the real world cases, either because of an error server-side or because the page removed the DOMNodeID (in which case it should exist in cached APC).

        I think the ideal fix would be to ensure the targeted nodes are put into the cached APC but I wouldn't block on this - maybe just leave a note?

        Mark Foltz

        Added a note to the test case. Do you know who wrote this tool?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alison Gale
        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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
          Gerrit-Change-Number: 7814741
          Gerrit-PatchSet: 14
          Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
          Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
          Gerrit-Attention: Alison Gale <ag...@chromium.org>
          Gerrit-Comment-Date: Wed, 27 May 2026 23:59:18 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Alison Gale (Gerrit)

          unread,
          May 27, 2026, 8:04:51 PM (21 hours ago) May 27
          to Mark Foltz, David Bokan, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
          Attention needed from Mark Foltz

          Alison Gale voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Mark Foltz
          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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
          Gerrit-Change-Number: 7814741
          Gerrit-PatchSet: 14
          Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
          Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
          Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
          Gerrit-Comment-Date: Thu, 28 May 2026 00:04:39 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          David Bokan (Gerrit)

          unread,
          9:43 AM (7 hours ago) 9:43 AM
          to Mark Foltz, Alison Gale, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
          Attention needed from Mark Foltz

          David Bokan voted and added 1 comment

          Votes added by David Bokan

          Code-Review+1

          1 comment

          File chrome/browser/glic/host/glic_actor_scroll_to_tool_interactive_uitest.cc
          Line 24, Patchset 11: // Disable TOCTOU validation because these tests do not populate
          // observed_target in MakeScrollTo, which would cause validation to fail
          David Bokan . resolved

          hmm, tests shouldn't have to manually populate this. observed_target is computed in the browser as part of executing an action [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/actor/tools/page_tool.cc;l=496;drc=94b8dff8418534977a39c201e209e2efc30b48d7).

          These tests call GetPageContextForActorTab which [should set](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=663;drc=94b8dff8418534977a39c201e209e2efc30b48d7) `last_observed_page_content` on the ActorTabData and the tests below inject an action using ExecuteAction which starts their journey at the [Glic API layer](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/glic/host/glic_actor_interactive_uitest_common.cc;l=128;drc=94b8dff8418534977a39c201e209e2efc30b48d7) so I would expect that this should work? Is there something else going on here or am I missing something?

          Mark Foltz

          After more digging the problem is the tests that use `ExecuteScrollToActionWithNodeId`. This helper extracts a nodeId directly from the DOM and attempts to scroll to DOM nodes that are not represented in the APC. Attempting TOCTOU on these actions is bound to fail.

          This tool seems to be incompatible with actor's implementation of TOCTOU and maybe there should be a tool-specific way to opt out. For now I have restructured the test to disable TOCTOU for those tests specifically.

          David Bokan

          Ah, I'm not sure it's specific to the tool. If the elements we're targeting here aren't added to APC (e.g. because they're not actionable / have no content?) then I think that's a test-bug, scroll_to should only be used to target things nodes in the cached APC.

          Some tests are checking for things like "the specified DOMNodeId doesn't exist" which could happen in the real world cases, either because of an error server-side or because the page removed the DOMNodeID (in which case it should exist in cached APC).

          I think the ideal fix would be to ensure the targeted nodes are put into the cached APC but I wouldn't block on this - maybe just leave a note?

          Mark Foltz

          Added a note to the test case. Do you know who wrote this tool?

          Gerrit-Comment-Date: Thu, 28 May 2026 13:43:01 +0000
          satisfied_requirement
          open
          diffy

          Mark Foltz (Gerrit)

          unread,
          3:40 PM (1 hour ago) 3:40 PM
          to Mark Foltz, Alison Gale, David Bokan, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, chromium...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org

          Mark Foltz voted Commit-Queue+2

          Commit-Queue+2
          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: Ie1d425683c2db539ebb2416d88dd3fde5b08238e
          Gerrit-Change-Number: 7814741
          Gerrit-PatchSet: 15
          Gerrit-Owner: Mark Foltz <mfo...@chromium.org>
          Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
          Gerrit-Comment-Date: Thu, 28 May 2026 19:40:27 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages