blink: Add ForTesting suffix to MockClipboardHost test-only members [chromium/src : main]

0 views
Skip to first unread message

Rohan Raja (Gerrit)

unread,
Jun 9, 2026, 12:16:05 AMJun 9
to Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dcheng+c...@chromium.org
Attention needed from Rohan Raja

Message from Rohan Raja

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Rohan Raja
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: I70a41d008803fc576651ccc1f72ca59f4fd585f8
Gerrit-Change-Number: 7907625
Gerrit-PatchSet: 1
Gerrit-Owner: Rohan Raja <ror...@microsoft.com>
Gerrit-Reviewer: Rohan Raja <ror...@microsoft.com>
Gerrit-Attention: Rohan Raja <ror...@microsoft.com>
Gerrit-Comment-Date: Tue, 09 Jun 2026 04:15:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ashish Kumar (Gerrit)

unread,
Jun 12, 2026, 2:13:02 AMJun 12
to Rohan Raja, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dcheng+c...@chromium.org
Attention needed from Rohan Raja

Ashish Kumar voted and added 2 comments

Votes added by Ashish Kumar

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Ashish Kumar . resolved

LGTM with minor suggestion.

File third_party/blink/renderer/modules/clipboard/clipboard_unittest.cc
Line 890, Patchset 1 (Latest): MockClipboardHostExposesTestOnlyHelpersWithForTestingSuffix) {
Ashish Kumar . unresolved

nit: Do we need an explicit test just for the names. Looks like these are already covered in existing tests.

Open in Gerrit

Related details

Attention is currently required from:
  • Rohan Raja
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement 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: I70a41d008803fc576651ccc1f72ca59f4fd585f8
    Gerrit-Change-Number: 7907625
    Gerrit-PatchSet: 1
    Gerrit-Owner: Rohan Raja <ror...@microsoft.com>
    Gerrit-Reviewer: Ashish Kumar <ashi...@microsoft.com>
    Gerrit-Comment-Date: Fri, 12 Jun 2026 06:12:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rohan Raja (Gerrit)

    unread,
    Jun 15, 2026, 6:09:41 AM (11 days ago) Jun 15
    to Ashish Kumar, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dcheng+c...@chromium.org

    Rohan Raja added 1 comment

    File third_party/blink/renderer/modules/clipboard/clipboard_unittest.cc
    Line 890, Patchset 1: MockClipboardHostExposesTestOnlyHelpersWithForTestingSuffix) {
    Ashish Kumar . resolved

    nit: Do we need an explicit test just for the names. Looks like these are already covered in existing tests.

    Rohan Raja

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement 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: I70a41d008803fc576651ccc1f72ca59f4fd585f8
      Gerrit-Change-Number: 7907625
      Gerrit-PatchSet: 2
      Gerrit-Owner: Rohan Raja <ror...@microsoft.com>
      Gerrit-Reviewer: Ashish Kumar <ashi...@microsoft.com>
      Gerrit-Reviewer: Rohan Raja <ror...@microsoft.com>
      Gerrit-Comment-Date: Mon, 15 Jun 2026 10:09:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Ashish Kumar <ashi...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Kent Tamura (Gerrit)

      unread,
      Jun 15, 2026, 8:20:28 PM (11 days ago) Jun 15
      to Rohan Raja, Kent Tamura, Dan Clark, Ashish Kumar, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dcheng+c...@chromium.org
      Attention needed from Dan Clark and Rohan Raja

      Kent Tamura voted and added 1 comment

      Votes added by Kent Tamura

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 2 (Latest):
      Kent Tamura . resolved

      I think the suffixes are for test-only functions/members in a production source file, and I don't think we need to apply the suffixes to `MockClipboardHost`, which belong to a target with `testonly=true`.

      Anyway, this CL is ok.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dan Clark
      • Rohan Raja
      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: I70a41d008803fc576651ccc1f72ca59f4fd585f8
      Gerrit-Change-Number: 7907625
      Gerrit-PatchSet: 2
      Gerrit-Owner: Rohan Raja <ror...@microsoft.com>
      Gerrit-Reviewer: Ashish Kumar <ashi...@microsoft.com>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
      Gerrit-Attention: Dan Clark <dan...@microsoft.com>
      Gerrit-Attention: Rohan Raja <ror...@microsoft.com>
      Gerrit-Comment-Date: Tue, 16 Jun 2026 00:19:52 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Rohan Raja (Gerrit)

      unread,
      Jun 15, 2026, 11:58:33 PM (10 days ago) Jun 15
      to Kent Tamura, Dan Clark, Ashish Kumar, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dcheng+c...@chromium.org
      Attention needed from Dan Clark

      Rohan Raja voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Dan Clark
      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: I70a41d008803fc576651ccc1f72ca59f4fd585f8
      Gerrit-Change-Number: 7907625
      Gerrit-PatchSet: 2
      Gerrit-Owner: Rohan Raja <ror...@microsoft.com>
      Gerrit-Reviewer: Ashish Kumar <ashi...@microsoft.com>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
      Gerrit-Reviewer: Rohan Raja <ror...@microsoft.com>
      Gerrit-Attention: Dan Clark <dan...@microsoft.com>
      Gerrit-Comment-Date: Tue, 16 Jun 2026 03:57:56 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jun 16, 2026, 12:52:04 AM (10 days ago) Jun 16
      to Rohan Raja, Kent Tamura, Dan Clark, Ashish Kumar, android-bu...@system.gserviceaccount.com, blink-...@chromium.org, dcheng+c...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      blink: Add ForTesting suffix to MockClipboardHost test-only members

      Per styleguide/c++/c++.md "Tests and Test-only Code", test-only
      methods should be suffixed with ForTesting and the backing fields
      with _for_testing_. blink::MockClipboardHost mixed
      mojo::ClipboardHost overrides (production-shape) with test-only
      helpers, counters and hooks that lacked the suffix, including the
      ReadTextCallCount / ReadHtmlCallCount /
      ReadAvailableFormatsCallCount cluster explicitly called out in the
      review of crrev.com/c/7854519.

      Rename the 12 public test-only methods and 6 backing fields to the
      ForTesting / _for_testing_ form. Update all call sites in
      mock_clipboard_host.{h,cc}, clipboard_unittest.cc, and
      system_clipboard_test.cc. The Mojo override method names dictated
      by mojom::blink::ClipboardHost are kept; only their bodies are
      updated to reference the renamed fields.

      The pre-existing read_available_formats_hook_for_testing_ field
      and SetReadAvailableFormatsHookForTesting method (added by
      CL 7854519) are already compliant and are left unchanged. This is
      a pure naming/style cleanup; no runtime behavior changes.
      Change-Id: I70a41d008803fc576651ccc1f72ca59f4fd585f8
      Reviewed-by: Ashish Kumar <ashi...@microsoft.com>
      Reviewed-by: Kent Tamura <tk...@chromium.org>
      Commit-Queue: Rohan Raja <ror...@microsoft.com>
      Cr-Commit-Position: refs/heads/main@{#1647317}
      Files:
      • M third_party/blink/renderer/core/clipboard/system_clipboard_test.cc
      • M third_party/blink/renderer/core/testing/mock_clipboard_host.cc
      • M third_party/blink/renderer/core/testing/mock_clipboard_host.h
      • M third_party/blink/renderer/modules/clipboard/clipboard_unittest.cc
      Change size: M
      Delta: 4 files changed, 94 insertions(+), 84 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Kent Tamura, +1 by Ashish Kumar
      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: I70a41d008803fc576651ccc1f72ca59f4fd585f8
      Gerrit-Change-Number: 7907625
      Gerrit-PatchSet: 3
      Gerrit-Owner: Rohan Raja <ror...@microsoft.com>
      Gerrit-Reviewer: Ashish Kumar <ashi...@microsoft.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Dan Clark <dan...@microsoft.com>
      Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
      Gerrit-Reviewer: Rohan Raja <ror...@microsoft.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages