[Public Transit] Pin tab functionality and tests [chromium/src : main]

0 views
Skip to first unread message

Fiaz Muhammad (Gerrit)

unread,
Dec 10, 2025, 2:11:48 PM (6 days ago) Dec 10
to Henrique Nakashima, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
Attention needed from Calder Kitagawa and Henrique Nakashima

Fiaz Muhammad voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Calder Kitagawa
  • Henrique Nakashima
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: I3eca70e63f71b03fe2441e4e2c1a321599171408
Gerrit-Change-Number: 7248307
Gerrit-PatchSet: 3
Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Dec 2025 19:11:43 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Henrique Nakashima (Gerrit)

unread,
Dec 10, 2025, 4:09:25 PM (6 days ago) Dec 10
to Fiaz Muhammad, Chromium LUCI CQ, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
Attention needed from Calder Kitagawa and Fiaz Muhammad

Henrique Nakashima added 1 comment

File chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabsPinnedStatusCondition.java
Line 44, Patchset 6 (Latest): public static boolean checkTabsPinnedStatus(
Henrique Nakashima . unresolved

If you inline this, you can have better status messages and not have to rely on a single boolean.

```
@Override
public ConditionStatus checkWithSuppliers() {
for (@TabId Integer tabId : tabIdsToCheck) {
Tab tab = tabModel.getTabById(tabId);
if (tab == null) continue;

boolean isTabPinned = tab.getIsPinned();
if (isTabPinned != shouldBePinned) {
return notFulfilled("Tab %s has isPinned=%b, expected isPinned=%b", tabId, isTabPinned, shouldBePinned);
}
}
return fulfilled("All tabs match expected pinned state");
}

```

Open in Gerrit

Related details

Attention is currently required from:
  • Calder Kitagawa
  • Fiaz Muhammad
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: I3eca70e63f71b03fe2441e4e2c1a321599171408
    Gerrit-Change-Number: 7248307
    Gerrit-PatchSet: 6
    Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
    Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
    Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
    Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
    Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
    Gerrit-Comment-Date: Wed, 10 Dec 2025 21:09:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Henrique Nakashima (Gerrit)

    unread,
    Dec 10, 2025, 4:10:19 PM (6 days ago) Dec 10
    to Fiaz Muhammad, Chromium LUCI CQ, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
    Attention needed from Calder Kitagawa and Fiaz Muhammad

    Henrique Nakashima added 1 comment

    File chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabsPinnedStatusCondition.java
    Line 44, Patchset 6 (Latest): public static boolean checkTabsPinnedStatus(
    Henrique Nakashima . unresolved

    If you inline this, you can have better status messages and not have to rely on a single boolean.

    ```
    @Override
    public ConditionStatus checkWithSuppliers() {
    for (@TabId Integer tabId : tabIdsToCheck) {
    Tab tab = tabModel.getTabById(tabId);
    if (tab == null) continue;

    boolean isTabPinned = tab.getIsPinned();
    if (isTabPinned != shouldBePinned) {
    return notFulfilled("Tab %s has isPinned=%b, expected isPinned=%b", tabId, isTabPinned, shouldBePinned);
    }
    }
    return fulfilled("All tabs match expected pinned state");
    }

    ```

    Henrique Nakashima

    Also, not sure if you intended for tab == null to skip that tab, I think it should result in notFulfilled(), right?

    Gerrit-Comment-Date: Wed, 10 Dec 2025 21:10:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Henrique Nakashima <hnaka...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Henrique Nakashima (Gerrit)

    unread,
    Dec 10, 2025, 4:14:57 PM (6 days ago) Dec 10
    to Fiaz Muhammad, Chromium LUCI CQ, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
    Attention needed from Calder Kitagawa and Fiaz Muhammad

    Henrique Nakashima added 3 comments

    File chrome/test/android/javatests/src/org/chromium/chrome/test/transit/hub/TabSwitcherTabCardContextMenuFacility.java
    Line 160, Patchset 6 (Latest): private void changePinnedState(boolean currentlyPinned) {
    Henrique Nakashima . unresolved

    Kind of weird for the param to be the current value, I'd probably use `newPinnedState`

    Line 163, Patchset 6 (Latest): boolean matchesPinnedStatus =
    ThreadUtils.runOnUiThreadBlocking(
    () ->
    checkTabsPinnedStatus(
    mHostStation.getTabModel(),
    List.of(mTabId),
    currentlyPinned));
    assertTrue(matchesPinnedStatus);
    Henrique Nakashima . unresolved
    ```
    noopTo().waitFor(new TabsPinnedStatusCondition(
    mHostStation.getTabModel(), List.of(mTabId), currentlyPinned))
    ```
    Line 175, Patchset 6 (Latest): mHostStation.getTabModel(), List.of(mTabId), currentlyPinned));
    Henrique Nakashima . unresolved

    should be !currentlyPinned or newPinnedState.

    Gerrit-Comment-Date: Wed, 10 Dec 2025 21:14:52 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Calder Kitagawa (Gerrit)

    unread,
    Dec 11, 2025, 9:54:41 AM (5 days ago) Dec 11
    to Fiaz Muhammad, Chromium LUCI CQ, Henrique Nakashima, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
    Attention needed from Fiaz Muhammad

    Calder Kitagawa added 1 comment

    File chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherLayoutPTTest.java
    Line 867, Patchset 6 (Latest): }
    Calder Kitagawa . unresolved

    Per last CL also move to ContextMenu test file.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Fiaz Muhammad
    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: I3eca70e63f71b03fe2441e4e2c1a321599171408
    Gerrit-Change-Number: 7248307
    Gerrit-PatchSet: 6
    Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
    Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
    Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
    Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
    Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
    Gerrit-Comment-Date: Thu, 11 Dec 2025 14:54:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Fiaz Muhammad (Gerrit)

    unread,
    Dec 12, 2025, 4:12:03 PM (4 days ago) Dec 12
    to Chromium LUCI CQ, Henrique Nakashima, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
    Attention needed from Calder Kitagawa and Henrique Nakashima

    Fiaz Muhammad added 5 comments

    File chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherLayoutPTTest.java
    Line 867, Patchset 6: }
    Calder Kitagawa . resolved

    Per last CL also move to ContextMenu test file.

    Fiaz Muhammad

    Done

    File chrome/test/android/javatests/src/org/chromium/chrome/test/transit/hub/TabSwitcherTabCardContextMenuFacility.java
    Line 160, Patchset 6: private void changePinnedState(boolean currentlyPinned) {
    Henrique Nakashima . resolved

    Kind of weird for the param to be the current value, I'd probably use `newPinnedState`

    Fiaz Muhammad

    Done

    Line 163, Patchset 6: boolean matchesPinnedStatus =

    ThreadUtils.runOnUiThreadBlocking(
    () ->
    checkTabsPinnedStatus(
    mHostStation.getTabModel(),
    List.of(mTabId),
    currentlyPinned));
    assertTrue(matchesPinnedStatus);
    Henrique Nakashima . resolved
    ```
    noopTo().waitFor(new TabsPinnedStatusCondition(
    mHostStation.getTabModel(), List.of(mTabId), currentlyPinned))
    ```
    Fiaz Muhammad

    Nice! Didn't know this was possible!

    Line 175, Patchset 6: mHostStation.getTabModel(), List.of(mTabId), currentlyPinned));
    Henrique Nakashima . resolved

    should be !currentlyPinned or newPinnedState.

    Fiaz Muhammad

    Done

    File chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabsPinnedStatusCondition.java
    Line 44, Patchset 6: public static boolean checkTabsPinnedStatus(
    Henrique Nakashima . resolved

    If you inline this, you can have better status messages and not have to rely on a single boolean.

    ```
    @Override
    public ConditionStatus checkWithSuppliers() {
    for (@TabId Integer tabId : tabIdsToCheck) {
    Tab tab = tabModel.getTabById(tabId);
    if (tab == null) continue;

    boolean isTabPinned = tab.getIsPinned();
    if (isTabPinned != shouldBePinned) {
    return notFulfilled("Tab %s has isPinned=%b, expected isPinned=%b", tabId, isTabPinned, shouldBePinned);
    }
    }
    return fulfilled("All tabs match expected pinned state");
    }

    ```

    Henrique Nakashima

    Also, not sure if you intended for tab == null to skip that tab, I think it should result in notFulfilled(), right?

    Fiaz Muhammad

    Thanks for catching that! Glad to finally get rid of that method.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Calder Kitagawa
    • Henrique Nakashima
    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: I3eca70e63f71b03fe2441e4e2c1a321599171408
      Gerrit-Change-Number: 7248307
      Gerrit-PatchSet: 8
      Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
      Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
      Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
      Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
      Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
      Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
      Gerrit-Comment-Date: Fri, 12 Dec 2025 21:11:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Henrique Nakashima <hnaka...@chromium.org>
      Comment-In-Reply-To: Calder Kitagawa <ckit...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Henrique Nakashima (Gerrit)

      unread,
      Dec 12, 2025, 4:31:41 PM (4 days ago) Dec 12
      to Fiaz Muhammad, Chromium LUCI CQ, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
      Attention needed from Calder Kitagawa and Fiaz Muhammad

      Henrique Nakashima voted and added 3 comments

      Votes added by Henrique Nakashima

      Code-Review+1

      3 comments

      File chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherCardContextMenuTest.java
      Line 146, Patchset 12 (Latest): RegularNewTabPageStation ntp = tabSwitcher.openNewTab();
      Henrique Nakashima . unresolved

      nit: Add a TODO(crbug.com/468013785): Remove when BlankCTATabInitialStateRule can reset state from the Tab Switcher.

      Line 166, Patchset 12 (Latest): ntp = tabSwitcher.openNewTab();
      Henrique Nakashima . unresolved

      ditto

      File chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabsPinnedStatusCondition.java
      Line 49, Patchset 12 (Latest): return "Tabs should all be " + (mShouldBePinned ? "pinned" : "unpinned");
      Henrique Nakashima . unresolved

      nit: "%d tabs should all be"

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Calder Kitagawa
      • Fiaz Muhammad
      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: I3eca70e63f71b03fe2441e4e2c1a321599171408
        Gerrit-Change-Number: 7248307
        Gerrit-PatchSet: 12
        Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
        Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
        Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
        Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
        Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
        Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
        Gerrit-Comment-Date: Fri, 12 Dec 2025 21:31:32 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Fiaz Muhammad (Gerrit)

        unread,
        Dec 12, 2025, 4:47:59 PM (4 days ago) Dec 12
        to Henrique Nakashima, Chromium LUCI CQ, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
        Attention needed from Calder Kitagawa and Henrique Nakashima

        Fiaz Muhammad added 3 comments

        File chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherCardContextMenuTest.java
        Line 146, Patchset 12: RegularNewTabPageStation ntp = tabSwitcher.openNewTab();
        Henrique Nakashima . resolved

        nit: Add a TODO(crbug.com/468013785): Remove when BlankCTATabInitialStateRule can reset state from the Tab Switcher.

        Fiaz Muhammad

        Done

        Line 166, Patchset 12: ntp = tabSwitcher.openNewTab();
        Henrique Nakashima . resolved

        ditto

        Fiaz Muhammad

        Done

        File chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabsPinnedStatusCondition.java
        Line 49, Patchset 12: return "Tabs should all be " + (mShouldBePinned ? "pinned" : "unpinned");
        Henrique Nakashima . resolved

        nit: "%d tabs should all be"

        Fiaz Muhammad

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Calder Kitagawa
        • Henrique Nakashima
        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: I3eca70e63f71b03fe2441e4e2c1a321599171408
          Gerrit-Change-Number: 7248307
          Gerrit-PatchSet: 13
          Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
          Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
          Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
          Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
          Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
          Gerrit-Comment-Date: Fri, 12 Dec 2025 21:47:53 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Henrique Nakashima (Gerrit)

          unread,
          Dec 12, 2025, 4:48:18 PM (4 days ago) Dec 12
          to Fiaz Muhammad, Chromium LUCI CQ, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
          Attention needed from Calder Kitagawa and Fiaz Muhammad

          Henrique Nakashima voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Calder Kitagawa
          • Fiaz Muhammad
          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: I3eca70e63f71b03fe2441e4e2c1a321599171408
            Gerrit-Change-Number: 7248307
            Gerrit-PatchSet: 13
            Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
            Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
            Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
            Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
            Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
            Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
            Gerrit-Comment-Date: Fri, 12 Dec 2025 21:48:10 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Henrique Nakashima (Gerrit)

            unread,
            Dec 12, 2025, 4:50:33 PM (4 days ago) Dec 12
            to Fiaz Muhammad, Chromium LUCI CQ, Calder Kitagawa, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
            Attention needed from Calder Kitagawa and Fiaz Muhammad

            Henrique Nakashima voted and added 1 comment

            Votes added by Henrique Nakashima

            Code-Review+1

            1 comment

            File base/test/android/javatests/src/org/chromium/base/test/transit/ScrollableFacility.java
            Line 332, Patchset 14 (Latest): return scrollToItemTo().withPossiblyAlreadyFulfilled().enterFacility(focusedItem);
            Henrique Nakashima . unresolved

            This shouldn't be needed because we've just checked that viewMatches.size() == 0. If this is to create checkAbsent, I think it's better to have a separate code path.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Calder Kitagawa
            • Fiaz Muhammad
            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: I3eca70e63f71b03fe2441e4e2c1a321599171408
              Gerrit-Change-Number: 7248307
              Gerrit-PatchSet: 14
              Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
              Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
              Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
              Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
              Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
              Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
              Gerrit-Comment-Date: Fri, 12 Dec 2025 21:50:25 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Calder Kitagawa (Gerrit)

              unread,
              Dec 15, 2025, 8:50:14 AM (yesterday) Dec 15
              to Fiaz Muhammad, Henrique Nakashima, Chromium LUCI CQ, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
              Attention needed from Fiaz Muhammad

              Calder Kitagawa voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Fiaz Muhammad
              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: I3eca70e63f71b03fe2441e4e2c1a321599171408
              Gerrit-Change-Number: 7248307
              Gerrit-PatchSet: 15
              Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
              Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
              Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
              Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
              Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
              Gerrit-Comment-Date: Mon, 15 Dec 2025 13:50:05 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Fiaz Muhammad (Gerrit)

              unread,
              Dec 15, 2025, 9:13:22 AM (yesterday) Dec 15
              to Calder Kitagawa, Henrique Nakashima, Chromium LUCI CQ, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
              Attention needed from Henrique Nakashima

              Fiaz Muhammad added 1 comment

              File base/test/android/javatests/src/org/chromium/base/test/transit/ScrollableFacility.java
              Line 332, Patchset 14: return scrollToItemTo().withPossiblyAlreadyFulfilled().enterFacility(focusedItem);
              Henrique Nakashima . unresolved

              This shouldn't be needed because we've just checked that viewMatches.size() == 0. If this is to create checkAbsent, I think it's better to have a separate code path.

              Fiaz Muhammad

              I did this, since the test seems to pass the `viewMatches.size() == 0` check, following which PT proceeds to inform me that the item is already visible.

              I'm willing to guess that it's since the ScrollableFacility viewMatches.size() check also checks for isCompletelyDisplayed() (100% visibility), while scrollToItemTo only requires 90%> visibility. I checked the logs, and we're at 91%.

              I modified the ItemFacility to relax the 100% visibility requirement to 90%> to ensure that items are fully displayed before moving on. Alternatively, I can update ScrollableFacility.Item to require 100% visibility or just go with my earlier fix.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Henrique Nakashima
              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: I3eca70e63f71b03fe2441e4e2c1a321599171408
              Gerrit-Change-Number: 7248307
              Gerrit-PatchSet: 15
              Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
              Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
              Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
              Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
              Gerrit-Attention: Henrique Nakashima <hnaka...@chromium.org>
              Gerrit-Comment-Date: Mon, 15 Dec 2025 14:13:13 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Henrique Nakashima (Gerrit)

              unread,
              Dec 15, 2025, 2:52:27 PM (19 hours ago) Dec 15
              to Fiaz Muhammad, Calder Kitagawa, Chromium LUCI CQ, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
              Attention needed from Calder Kitagawa and Fiaz Muhammad

              Henrique Nakashima voted and added 1 comment

              Votes added by Henrique Nakashima

              Code-Review+1

              1 comment

              File base/test/android/javatests/src/org/chromium/base/test/transit/ScrollableFacility.java
              Line 332, Patchset 14: return scrollToItemTo().withPossiblyAlreadyFulfilled().enterFacility(focusedItem);
              Henrique Nakashima . resolved

              This shouldn't be needed because we've just checked that viewMatches.size() == 0. If this is to create checkAbsent, I think it's better to have a separate code path.

              Fiaz Muhammad

              I did this, since the test seems to pass the `viewMatches.size() == 0` check, following which PT proceeds to inform me that the item is already visible.

              I'm willing to guess that it's since the ScrollableFacility viewMatches.size() check also checks for isCompletelyDisplayed() (100% visibility), while scrollToItemTo only requires 90%> visibility. I checked the logs, and we're at 91%.

              I modified the ItemFacility to relax the 100% visibility requirement to 90%> to ensure that items are fully displayed before moving on. Alternatively, I can update ScrollableFacility.Item to require 100% visibility or just go with my earlier fix.

              Henrique Nakashima

              You're right, let's just do withPossiblyAlreadyFulfilled() here (and add a comment). Thanks for the explanation!

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Calder Kitagawa
              • Fiaz Muhammad
              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: I3eca70e63f71b03fe2441e4e2c1a321599171408
                Gerrit-Change-Number: 7248307
                Gerrit-PatchSet: 21
                Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
                Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
                Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
                Gerrit-Attention: Calder Kitagawa <ckit...@chromium.org>
                Gerrit-Comment-Date: Mon, 15 Dec 2025 19:52:19 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: Yes
                Comment-In-Reply-To: Henrique Nakashima <hnaka...@chromium.org>
                Comment-In-Reply-To: Fiaz Muhammad <mf...@google.com>
                satisfied_requirement
                open
                diffy

                Calder Kitagawa (Gerrit)

                unread,
                Dec 15, 2025, 3:00:00 PM (19 hours ago) Dec 15
                to Fiaz Muhammad, Henrique Nakashima, Chromium LUCI CQ, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org
                Attention needed from Fiaz Muhammad

                Calder Kitagawa voted Code-Review+1

                Code-Review+1
                Open in Gerrit

                Related details

                Attention is currently required from:
                • Fiaz Muhammad
                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: I3eca70e63f71b03fe2441e4e2c1a321599171408
                Gerrit-Change-Number: 7248307
                Gerrit-PatchSet: 22
                Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
                Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
                Gerrit-Attention: Fiaz Muhammad <mf...@google.com>
                Gerrit-Comment-Date: Mon, 15 Dec 2025 19:59:52 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Fiaz Muhammad (Gerrit)

                unread,
                Dec 15, 2025, 5:26:27 PM (16 hours ago) Dec 15
                to Calder Kitagawa, Henrique Nakashima, Chromium LUCI CQ, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org

                Fiaz Muhammad 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: I3eca70e63f71b03fe2441e4e2c1a321599171408
                Gerrit-Change-Number: 7248307
                Gerrit-PatchSet: 23
                Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
                Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
                Gerrit-Comment-Date: Mon, 15 Dec 2025 22:26:20 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Chromium LUCI CQ (Gerrit)

                unread,
                Dec 15, 2025, 6:35:25 PM (15 hours ago) Dec 15
                to Fiaz Muhammad, Calder Kitagawa, Henrique Nakashima, chromium...@chromium.org, davidj...@chromium.org, gogeral...@chromium.org, hanxi...@chromium.org, mattsimm...@chromium.org, meilian...@chromium.org, wychen...@chromium.org, yuezhang...@chromium.org, yusufo...@chromium.org

                Chromium LUCI CQ submitted the change

                Unreviewed changes

                22 is the latest approved patch-set.
                No files were changed between the latest approved patch-set and the submitted one.

                Change information

                Commit message:
                [Public Transit] Pin tab functionality and tests

                - Add methods to click the "Pin tab" menu entry and account for
                its variants.
                - Add a condition to check tabs pinned status.
                - Add tests.
                Bug: 467341609
                Change-Id: I3eca70e63f71b03fe2441e4e2c1a321599171408
                Reviewed-by: Henrique Nakashima <hnaka...@chromium.org>
                Reviewed-by: Calder Kitagawa <ckit...@chromium.org>
                Commit-Queue: Fiaz Muhammad <mf...@google.com>
                Cr-Commit-Position: refs/heads/main@{#1559040}
                Files:
                • M base/test/android/javatests/src/org/chromium/base/test/transit/ScrollableFacility.java
                • M chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherCardContextMenuTest.java
                • M chrome/test/android/BUILD.gn
                • M chrome/test/android/javatests/src/org/chromium/chrome/test/transit/hub/TabSwitcherTabCardContextMenuFacility.java
                • A chrome/test/android/javatests/src/org/chromium/chrome/test/transit/tabmodel/TabsPinnedStatusCondition.java
                Change size: M
                Delta: 5 files changed, 145 insertions(+), 5 deletions(-)
                Branch: refs/heads/main
                Submit Requirements:
                • requirement satisfiedCode-Review: +1 by Henrique Nakashima, +1 by Calder Kitagawa
                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: I3eca70e63f71b03fe2441e4e2c1a321599171408
                Gerrit-Change-Number: 7248307
                Gerrit-PatchSet: 24
                Gerrit-Owner: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Calder Kitagawa <ckit...@chromium.org>
                Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                Gerrit-Reviewer: Fiaz Muhammad <mf...@google.com>
                Gerrit-Reviewer: Henrique Nakashima <hnaka...@chromium.org>
                open
                diffy
                satisfied_requirement
                Reply all
                Reply to author
                Forward
                0 new messages