[focusgroup] Add PrintTo helper for logging FocusgroupFlags [chromium/src : main]

0 views
Skip to first unread message

Jacques Newman (Gerrit)

unread,
Sep 22, 2025, 12:54:04 PM (2 days ago) Sep 22
to Mason Freed, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org
Attention needed from Mason Freed

Jacques Newman added 1 comment

File third_party/blink/renderer/core/dom/focusgroup_flags.h
Line 62, Patchset 6 (Latest):CORE_EXPORT String FocusgroupFlagsToStringForTesting(FocusgroupFlags flags);
Jacques Newman . unresolved

I found this export was needed to build some configurations of blink_unittests, let me know if there is a better pattern I can use here, as subsequent changes add more helpers that run into the same issue where testing is the only place where they will be called outside of core. (Of course, this one is only ever called in test).

Open in Gerrit

Related details

Attention is currently required from:
  • Mason Freed
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: I07fa1d2d123f123cc2db1fafd12e9b1d8e640a58
Gerrit-Change-Number: 6961756
Gerrit-PatchSet: 6
Gerrit-Owner: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Attention: Mason Freed <mas...@chromium.org>
Gerrit-Comment-Date: Mon, 22 Sep 2025 16:53:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mason Freed (Gerrit)

unread,
Sep 23, 2025, 10:45:20 AM (yesterday) Sep 23
to Jacques Newman, Philip Rogers, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org
Attention needed from Jacques Newman and Philip Rogers

Mason Freed voted and added 3 comments

Votes added by Mason Freed

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Mason Freed . resolved

LGTM, but +pdr@ for more advice on exposing debug strings.

File third_party/blink/renderer/core/dom/element_test.cc
Line 967, Patchset 6 (Latest): focusgroup::FocusgroupFlagsToStringForTesting(FocusgroupFlags::kNone));
Mason Freed . resolved

A test for the test strings function. I like it. 😊

File third_party/blink/renderer/core/dom/focusgroup_flags.h
Line 62, Patchset 6 (Latest):CORE_EXPORT String FocusgroupFlagsToStringForTesting(FocusgroupFlags flags);
Jacques Newman . unresolved

I found this export was needed to build some configurations of blink_unittests, let me know if there is a better pattern I can use here, as subsequent changes add more helpers that run into the same issue where testing is the only place where they will be called outside of core. (Of course, this one is only ever called in test).

Mason Freed

+pdr@ who I think has added some similar test-only helpers in the past. This seems ok to me, but it's hard to find a similar pattern to follow in the codebase.

Open in Gerrit

Related details

Attention is currently required from:
  • Jacques Newman
  • Philip Rogers
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
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: I07fa1d2d123f123cc2db1fafd12e9b1d8e640a58
Gerrit-Change-Number: 6961756
Gerrit-PatchSet: 6
Gerrit-Owner: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Jacques Newman <jane...@microsoft.com>
Gerrit-Comment-Date: Tue, 23 Sep 2025 14:45:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Jacques Newman <jane...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Philip Rogers (Gerrit)

unread,
Sep 23, 2025, 6:47:37 PM (17 hours ago) Sep 23
to Jacques Newman, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org
Attention needed from Jacques Newman

Philip Rogers voted and added 1 comment

Votes added by Philip Rogers

Code-Review+1

1 comment

File third_party/blink/renderer/core/dom/focusgroup_flags.h
Line 62, Patchset 6 (Latest):CORE_EXPORT String FocusgroupFlagsToStringForTesting(FocusgroupFlags flags);
Jacques Newman . resolved

I found this export was needed to build some configurations of blink_unittests, let me know if there is a better pattern I can use here, as subsequent changes add more helpers that run into the same issue where testing is the only place where they will be called outside of core. (Of course, this one is only ever called in test).

Mason Freed

+pdr@ who I think has added some similar test-only helpers in the past. This seems ok to me, but it's hard to find a similar pattern to follow in the codebase.

Philip Rogers

This seems fine to me.

Open in Gerrit

Related details

Attention is currently required from:
  • Jacques Newman
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
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: I07fa1d2d123f123cc2db1fafd12e9b1d8e640a58
Gerrit-Change-Number: 6961756
Gerrit-PatchSet: 6
Gerrit-Owner: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Attention: Jacques Newman <jane...@microsoft.com>
Gerrit-Comment-Date: Tue, 23 Sep 2025 22:47:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Mason Freed <mas...@chromium.org>
Comment-In-Reply-To: Jacques Newman <jane...@microsoft.com>
satisfied_requirement
open
diffy

Jacques Newman (Gerrit)

unread,
Sep 23, 2025, 6:49:05 PM (17 hours ago) Sep 23
to Philip Rogers, Mason Freed, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org

Jacques Newman 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
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: I07fa1d2d123f123cc2db1fafd12e9b1d8e640a58
Gerrit-Change-Number: 6961756
Gerrit-PatchSet: 6
Gerrit-Owner: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
Gerrit-Comment-Date: Tue, 23 Sep 2025 22:48:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Sep 23, 2025, 7:38:47 PM (16 hours ago) Sep 23
to Jacques Newman, Philip Rogers, Mason Freed, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
[focusgroup] Add PrintTo helper for logging FocusgroupFlags

Adds helper to make FocusgroupFlags human-readable for tests and debug
logging.

This change also updates the FocusgroupFlags parsing unittests to
prefer EXPECT_* over ASSERT_* for situations where it would be
possible for the test to continue.
Bug: 40210717
Change-Id: I07fa1d2d123f123cc2db1fafd12e9b1d8e640a58
Reviewed-by: Mason Freed <mas...@chromium.org>
Reviewed-by: Philip Rogers <p...@chromium.org>
Commit-Queue: Jacques Newman <jane...@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1519670}
Files:
  • M third_party/blink/renderer/core/dom/element_test.cc
  • M third_party/blink/renderer/core/dom/focusgroup_flags.cc
  • M third_party/blink/renderer/core/dom/focusgroup_flags.h
Change size: L
Delta: 3 files changed, 171 insertions(+), 83 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Mason Freed, +1 by Philip Rogers
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: I07fa1d2d123f123cc2db1fafd12e9b1d8e640a58
Gerrit-Change-Number: 6961756
Gerrit-PatchSet: 7
Gerrit-Owner: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Jacques Newman <jane...@microsoft.com>
Gerrit-Reviewer: Mason Freed <mas...@chromium.org>
Gerrit-Reviewer: Philip Rogers <p...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages