Change ToolBase::ResolveTarget for points to allow pseudo-nodes [chromium/src : main]

0 views
Skip to first unread message

Russ Hamilton (Gerrit)

unread,
2:50 PM (5 hours ago) 2:50 PM
to David Bokan, Kevin Graney, Chromium LUCI CQ, chromium...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
Attention needed from David Bokan

Russ Hamilton added 4 comments

Commit Message
Line 13, Patchset 4:
Bug:448353852
David Bokan . resolved

nit: the format for internal bugs is `Bug: b:448353852`

Russ Hamilton

Done

File chrome/browser/actor/tools/type_tool_browsertest.cc
Line 552, Patchset 4: // Type into input covered by pseudo-element
David Bokan . unresolved

Would this have failed prior to this CL? IIUC we're not running TOCTOU checks in browsertests because we don't actually fetch an observation from the tab (unless I'm missing where that's happening...)

Russ Hamilton

You're right. This test would pass before (because we don't run TOCTOU tests here). I can remove it if you think it's redundant.

File chrome/browser/glic/host/glic_actor_type_tool_interactive_uitest.cc
Line 256, Patchset 4: // Third test case - input obscured by pseudo-element. Just try to click
// and type on the container.
GetPageContextFromFocusedTab(),
GetClientRect(kTypingTestTabId, "pseudoContainer", current_bounds),
ExecuteAction(type_in_current_bounds),
WaitForJsResult(kTypingTestTabId,
"()=>document.getElementById('pseudoInput').value",
kTypedString));
David Bokan . unresolved

nit: WDYT about splitting these into separate tests...that way it's easier to see what's broken and each case is simpler to understand (as well has having less state to keep track of)

Russ Hamilton

I'm fine with splitting them up, it just seems more verbose as we would need to copy 20+ lines of setup just to run 3 lines of test.

When they fail, the error message tells you where it failed (timed out waiting for <JS snippet>), so it doesn't seem that hard to understand.

Also, what state to keep track of are you referring to here?

File chrome/renderer/actor/tool_base.cc
Line 184, Patchset 4: // TODO: behamilton - This is a bit of a hack. Is there a better way?
David Bokan . resolved

I expect we'd have to add some APIs on WebNode to do this correctly.

But why not just fix the [hit test](https://source.chromium.org/chromium/chromium/src/+/main:chrome/renderer/actor/tool_base.cc;l=96;drc=3173880ec3dc5bce93ea50722d517a9056db6523) to use `InnerPossiblyPseudoNode()` (which you'd have to expose on WebHitTestResult) so that you don't have to touch this part? IMHO if APC includes pseudo nodes we should hit test DOM to pseudo nodes too.

Russ Hamilton

Yeah, I guess that makes sense. For some reason I was thinking we'd need more extensive changes than that.

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: I77696352de06070e30a2fef36a2387f00c21eafb
Gerrit-Change-Number: 7050563
Gerrit-PatchSet: 7
Gerrit-Owner: Russ Hamilton <beham...@google.com>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Kevin Graney <k...@google.com>
Gerrit-Reviewer: Russ Hamilton <beham...@google.com>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Oct 2025 18:50:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: David Bokan <bo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

David Bokan (Gerrit)

unread,
4:25 PM (4 hours ago) 4:25 PM
to Russ Hamilton, AyeAye, Kevin Graney, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
Attention needed from Russ Hamilton

David Bokan voted and added 3 comments

Votes added by David Bokan

Code-Review+1

3 comments

Patchset-level comments
File chrome/browser/actor/tools/type_tool_browsertest.cc
Line 552, Patchset 4: // Type into input covered by pseudo-element
David Bokan . unresolved

Would this have failed prior to this CL? IIUC we're not running TOCTOU checks in browsertests because we don't actually fetch an observation from the tab (unless I'm missing where that's happening...)

Russ Hamilton

You're right. This test would pass before (because we don't run TOCTOU tests here). I can remove it if you think it's redundant.

David Bokan

Don't feel strongly but yeah, it's not adding anything so don't see any reason to keep it.

File chrome/browser/glic/host/glic_actor_type_tool_interactive_uitest.cc
Line 256, Patchset 4: // Third test case - input obscured by pseudo-element. Just try to click
// and type on the container.
GetPageContextFromFocusedTab(),
GetClientRect(kTypingTestTabId, "pseudoContainer", current_bounds),
ExecuteAction(type_in_current_bounds),
WaitForJsResult(kTypingTestTabId,
"()=>document.getElementById('pseudoInput').value",
kTypedString));
David Bokan . unresolved

nit: WDYT about splitting these into separate tests...that way it's easier to see what's broken and each case is simpler to understand (as well has having less state to keep track of)

Russ Hamilton

I'm fine with splitting them up, it just seems more verbose as we would need to copy 20+ lines of setup just to run 3 lines of test.

When they fail, the error message tells you where it failed (timed out waiting for <JS snippet>), so it doesn't seem that hard to understand.

Also, what state to keep track of are you referring to here?

David Bokan

It's nit-level but mainly just minimizing cognitive load (i.e. an unfamiliar reader investigating this broken test wouldn't have to understand what each step is doing and keep track of any possible state change to the test harness or page). But it's a minor point and I don't feel strongly so I'll leave it to you.

Open in Gerrit

Related details

Attention is currently required from:
  • Russ Hamilton
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: I77696352de06070e30a2fef36a2387f00c21eafb
    Gerrit-Change-Number: 7050563
    Gerrit-PatchSet: 7
    Gerrit-Owner: Russ Hamilton <beham...@google.com>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Kevin Graney <k...@google.com>
    Gerrit-Reviewer: Russ Hamilton <beham...@google.com>
    Gerrit-Attention: Russ Hamilton <beham...@google.com>
    Gerrit-Comment-Date: Mon, 20 Oct 2025 20:25:38 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Russ Hamilton <beham...@google.com>
    Comment-In-Reply-To: David Bokan <bo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Russ Hamilton (Gerrit)

    unread,
    5:35 PM (2 hours ago) 5:35 PM
    to Nico Weber, Kevin Graney, David Bokan, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
    Attention needed from Nico Weber

    Russ Hamilton added 2 comments

    File chrome/browser/actor/tools/type_tool_browsertest.cc
    Line 552, Patchset 4: // Type into input covered by pseudo-element
    David Bokan . resolved

    Would this have failed prior to this CL? IIUC we're not running TOCTOU checks in browsertests because we don't actually fetch an observation from the tab (unless I'm missing where that's happening...)

    Russ Hamilton

    You're right. This test would pass before (because we don't run TOCTOU tests here). I can remove it if you think it's redundant.

    David Bokan

    Don't feel strongly but yeah, it's not adding anything so don't see any reason to keep it.

    Russ Hamilton

    Done

    File chrome/browser/glic/host/glic_actor_type_tool_interactive_uitest.cc
    Line 256, Patchset 4: // Third test case - input obscured by pseudo-element. Just try to click
    // and type on the container.
    GetPageContextFromFocusedTab(),
    GetClientRect(kTypingTestTabId, "pseudoContainer", current_bounds),
    ExecuteAction(type_in_current_bounds),
    WaitForJsResult(kTypingTestTabId,
    "()=>document.getElementById('pseudoInput').value",
    kTypedString));
    David Bokan . resolved

    nit: WDYT about splitting these into separate tests...that way it's easier to see what's broken and each case is simpler to understand (as well has having less state to keep track of)

    Russ Hamilton

    I'm fine with splitting them up, it just seems more verbose as we would need to copy 20+ lines of setup just to run 3 lines of test.

    When they fail, the error message tells you where it failed (timed out waiting for <JS snippet>), so it doesn't seem that hard to understand.

    Also, what state to keep track of are you referring to here?

    David Bokan

    It's nit-level but mainly just minimizing cognitive load (i.e. an unfamiliar reader investigating this broken test wouldn't have to understand what each step is doing and keep track of any possible state change to the test harness or page). But it's a minor point and I don't feel strongly so I'll leave it to you.

    Russ Hamilton

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Nico Weber
    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: I77696352de06070e30a2fef36a2387f00c21eafb
      Gerrit-Change-Number: 7050563
      Gerrit-PatchSet: 8
      Gerrit-Owner: Russ Hamilton <beham...@google.com>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
      Gerrit-Reviewer: Russ Hamilton <beham...@google.com>
      Gerrit-CC: Kevin Graney <k...@google.com>
      Gerrit-Attention: Nico Weber <tha...@chromium.org>
      Gerrit-Comment-Date: Mon, 20 Oct 2025 21:35:50 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Nico Weber (Gerrit)

      unread,
      6:59 PM (1 hour ago) 6:59 PM
      to Russ Hamilton, Nico Weber, Kevin Graney, David Bokan, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
      Attention needed from Russ Hamilton

      Nico Weber voted and added 1 comment

      Votes added by Nico Weber

      Code-Review+1

      1 comment

      File chrome/browser/glic/host/glic_actor_type_tool_interactive_uitest.cc
      Line 217, Patchset 8 (Latest):// Tests that typing at a coordinates succeed
      Nico Weber . unresolved

      nit: s/a coordinates/coordinates/

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Russ Hamilton
      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: I77696352de06070e30a2fef36a2387f00c21eafb
      Gerrit-Change-Number: 7050563
      Gerrit-PatchSet: 8
      Gerrit-Owner: Russ Hamilton <beham...@google.com>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
      Gerrit-Reviewer: Russ Hamilton <beham...@google.com>
      Gerrit-CC: Kevin Graney <k...@google.com>
      Gerrit-Attention: Russ Hamilton <beham...@google.com>
      Gerrit-Comment-Date: Mon, 20 Oct 2025 22:59:32 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages