[TabGroups] Add support for closing tab groups via middle mouse click [chromium/src : main]

0 views
Skip to first unread message

Jay Kapadia (Gerrit)

unread,
Mar 29, 2025, 7:04:04 PMMar 29
to Alison Gale, David Pennington, chromium...@chromium.org
Attention needed from Alison Gale and David Pennington

Jay Kapadia added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Jay Kapadia . resolved

Hello mentors,

I have implemented the functionality and added the corresponding test. The functionality is working perfectly. However, I am unable to run the test individually.

Could you please suggest the correct command to run it?

Open in Gerrit

Related details

Attention is currently required from:
  • Alison Gale
  • David Pennington
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Iaf5ddd755f2b0cca13a78c57cb60e2fa28fb95aa
Gerrit-Change-Number: 6412536
Gerrit-PatchSet: 1
Gerrit-Owner: Jay Kapadia <jaykap...@gmail.com>
Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
Gerrit-Attention: Alison Gale <ag...@chromium.org>
Gerrit-Attention: David Pennington <dpen...@chromium.org>
Gerrit-Comment-Date: Sat, 29 Mar 2025 23:03:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alison Gale (Gerrit)

unread,
Mar 31, 2025, 4:01:14 PMMar 31
to Jay Kapadia, David Pennington, chromium...@chromium.org
Attention needed from David Pennington and Jay Kapadia

Alison Gale added 2 comments

Patchset-level comments
Jay Kapadia . resolved

Hello mentors,

I have implemented the functionality and added the corresponding test. The functionality is working perfectly. However, I am unable to run the test individually.

Could you please suggest the correct command to run it?

Alison Gale

To run an interactive UI test, you would build it with the command `autoninja -C out\Default interactive_ui_tests` and then you can run a single test with the command `out\Default\interactive_ui_tests --gtest_filter=SavedTabGroupInteractiveTest.CloseTabGroupOnMiddleMouseClick`

Alison Gale . resolved

Overall this looks good to me

Open in Gerrit

Related details

Attention is currently required from:
  • David Pennington
  • Jay Kapadia
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Iaf5ddd755f2b0cca13a78c57cb60e2fa28fb95aa
Gerrit-Change-Number: 6412536
Gerrit-PatchSet: 1
Gerrit-Owner: Jay Kapadia <jaykap...@gmail.com>
Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
Gerrit-Attention: David Pennington <dpen...@chromium.org>
Gerrit-Attention: Jay Kapadia <jaykap...@gmail.com>
Gerrit-Comment-Date: Mon, 31 Mar 2025 20:01:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jay Kapadia <jaykap...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jay Kapadia (Gerrit)

unread,
Apr 1, 2025, 1:44:09 PMApr 1
to Alison Gale, David Pennington, chromium...@chromium.org
Attention needed from Alison Gale and David Pennington

Jay Kapadia added 2 comments

Patchset-level comments
Jay Kapadia . resolved

Hello mentors,

I have implemented the functionality and added the corresponding test. The functionality is working perfectly. However, I am unable to run the test individually.

Could you please suggest the correct command to run it?

Alison Gale

To run an interactive UI test, you would build it with the command `autoninja -C out\Default interactive_ui_tests` and then you can run a single test with the command `out\Default\interactive_ui_tests --gtest_filter=SavedTabGroupInteractiveTest.CloseTabGroupOnMiddleMouseClick`

Jay Kapadia

Thank you, it worked.

File-level comment, Patchset 2 (Latest):
Jay Kapadia . resolved

I corrected some mistakes in the test.

Also, while running the test I was getting EXCEPTION_ACCESS_VIOLATION on `tab_slot_controller_->EndDrag(END_DRAG_COMPLETE);`. So, I returned early from the if block. According to me this should not cause any side effects but I request that you verify it once.

Open in Gerrit

Related details

Attention is currently required from:
  • Alison Gale
  • David Pennington
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Iaf5ddd755f2b0cca13a78c57cb60e2fa28fb95aa
Gerrit-Change-Number: 6412536
Gerrit-PatchSet: 2
Gerrit-Owner: Jay Kapadia <jaykap...@gmail.com>
Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
Gerrit-Attention: Alison Gale <ag...@chromium.org>
Gerrit-Attention: David Pennington <dpen...@chromium.org>
Gerrit-Comment-Date: Tue, 01 Apr 2025 17:43:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alison Gale <ag...@chromium.org>
Comment-In-Reply-To: Jay Kapadia <jaykap...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alison Gale (Gerrit)

unread,
Apr 1, 2025, 2:27:02 PMApr 1
to Jay Kapadia, David Pennington, chromium...@chromium.org
Attention needed from David Pennington and Jay Kapadia

Alison Gale added 1 comment

Patchset-level comments
Jay Kapadia . resolved

I corrected some mistakes in the test.

Also, while running the test I was getting EXCEPTION_ACCESS_VIOLATION on `tab_slot_controller_->EndDrag(END_DRAG_COMPLETE);`. So, I returned early from the if block. According to me this should not cause any side effects but I request that you verify it once.

Alison Gale

Does it work if the drag is ended before the tab group is closed? I was curious so I looked at the corresponding implementation in tab.cc and that appears to be what they are doing. My guess is that if it tries to end a drag after tabs have already been deleted it would cause a problem.

https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/tabs/tab.cc;l=575-577?q=Tab.cc%20-f:out%2F&ss=chromium

Open in Gerrit

Related details

Attention is currently required from:
  • David Pennington
  • Jay Kapadia
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Iaf5ddd755f2b0cca13a78c57cb60e2fa28fb95aa
Gerrit-Change-Number: 6412536
Gerrit-PatchSet: 2
Gerrit-Owner: Jay Kapadia <jaykap...@gmail.com>
Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
Gerrit-Attention: David Pennington <dpen...@chromium.org>
Gerrit-Attention: Jay Kapadia <jaykap...@gmail.com>
Gerrit-Comment-Date: Tue, 01 Apr 2025 18:26:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Jay Kapadia <jaykap...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Jay Kapadia (Gerrit)

unread,
Apr 2, 2025, 2:34:53 PMApr 2
to Alison Gale, David Pennington, chromium...@chromium.org
Attention needed from Alison Gale and David Pennington

Jay Kapadia added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Jay Kapadia . resolved

I ended the drag before the if block. This way END_DRAG is called unconditionally and it is called before the tab group potentially closes.

I tried it, it is working and test is also working as expected.

Open in Gerrit

Related details

Attention is currently required from:
  • Alison Gale
  • David Pennington
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Iaf5ddd755f2b0cca13a78c57cb60e2fa28fb95aa
Gerrit-Change-Number: 6412536
Gerrit-PatchSet: 3
Gerrit-Owner: Jay Kapadia <jaykap...@gmail.com>
Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
Gerrit-Attention: Alison Gale <ag...@chromium.org>
Gerrit-Attention: David Pennington <dpen...@chromium.org>
Gerrit-Comment-Date: Wed, 02 Apr 2025 18:34:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alison Gale (Gerrit)

unread,
Apr 2, 2025, 2:38:45 PMApr 2
to Jay Kapadia, David Pennington, chromium...@chromium.org
Attention needed from David Pennington and Jay Kapadia

Alison Gale added 1 comment

File chrome/browser/ui/views/tabs/tab_group_header.cc
Line 234, Patchset 3 (Latest): tab_slot_controller_->EndDrag(END_DRAG_COMPLETE);

if (!dragging()) {
Alison Gale . unresolved

David, do you have context on whether we would need to cache the !dragging value before ending the drag above or are those unrelated variables? This is a similar pattern to what is used in tab.cc. Could just throw it behind a flag if we want to be extra safe when landing

Open in Gerrit

Related details

Attention is currently required from:
  • David Pennington
  • Jay Kapadia
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: Iaf5ddd755f2b0cca13a78c57cb60e2fa28fb95aa
    Gerrit-Change-Number: 6412536
    Gerrit-PatchSet: 3
    Gerrit-Owner: Jay Kapadia <jaykap...@gmail.com>
    Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
    Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
    Gerrit-Attention: David Pennington <dpen...@chromium.org>
    Gerrit-Attention: Jay Kapadia <jaykap...@gmail.com>
    Gerrit-Comment-Date: Wed, 02 Apr 2025 18:38:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jay Kapadia (Gerrit)

    unread,
    Apr 12, 2025, 3:39:27 PMApr 12
    to Chromium LUCI CQ, Alison Gale, David Pennington, chromium...@chromium.org

    Jay Kapadia added 1 comment

    Patchset-level comments
    Jay Kapadia . resolved

    The test is failing on `mac-rel` run, likely because the middle mouse click is not being simulated correctly on mac devices. On doing some research I found that mac does not support middle clicks.

    Should I exclude mac from the test?

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: Iaf5ddd755f2b0cca13a78c57cb60e2fa28fb95aa
    Gerrit-Change-Number: 6412536
    Gerrit-PatchSet: 3
    Gerrit-Owner: Jay Kapadia <jaykap...@gmail.com>
    Gerrit-Reviewer: Alison Gale <ag...@chromium.org>
    Gerrit-Reviewer: David Pennington <dpen...@chromium.org>
    Gerrit-Comment-Date: Sat, 12 Apr 2025 19:39:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages