ShelfView::last_visible_index_ is sometimes wrong, test failures in ShelfViewTest and ShelfViewOverflowFocusTest |
||
Issue descriptionI recently wrote a CL that adds a text-only button to the status area when running with --enable-features=SingleProcessMash. To my surprise this caused a variety of unit test failures, including: ShelfViewTest.ShelfRipOff ShelfViewOverflowFocusTest.Basic ShelfViewOverflowFocusTest.ForwardCyclingWithBubbleOpen My code changes the width of the ShelfView, but it does so in a way identical to LogoutButtonTray, which we use in production. shelf_view.h has a diagram showing that ShelfView::last_visible_index() should match the overflow shelf's first_visible_index(). That isn't true for some shelf widths. I wrote a test CL to demonstrate the problem: https://chromium-review.googlesource.com/c/chromium/src/+/1253077 At certain shelf widths ShelfView::last_visible_index_ goes backwards when the overflow bubble appears. According to the diagram in shelf_view.h that shouldn't happen. I can also see this happening when running chrome, especially if I make the desktop window very narrow. sammiequon added the overflow focus tests recently: https://chromium-review.googlesource.com/1125317 manucornet's CL here made some changes to last_visible_index_ computation: https://chromium-review.googlesource.com/c/chromium/src/+/1150776 manucornet's CL here commented out some overflow-bubble test expectations that are similar to the failures I'm seeing: https://chromium-review.googlesource.com/c/chromium/src/+/1188848 Commented out expectations: https://cs.chromium.org/chromium/src/ash/shelf/shelf_view_unittest.cc?sq=package:chromium&g=0&l=909 I think something is wrong in last_visible_index computation, maybe only in tests, but maybe in production as well. Manu, could you investigate?
,
Oct 2
Hey Manu, would you mind giving James a hand diagnosing the new shelf code? Thanks!
,
Oct 3
I'm OoO for a few days, but will be glad to do that when I'm back!
,
Dec 12
|
||
►
Sign in to add a comment |
||
Comment 1 by jamescook@chromium.org
, Oct 2