Fix intermittent ContainersBrowserTest.ShouldShowTabAccent (#33976)
Add RunScheduledLayouts() before checking ShouldShowLargeAccentIcon() to ensure the tab strip layout is complete and the tab has correct dimensions. ShouldShowLargeAccentIcon() depends on the tab's width(), which may not be set yet if the Views layout pass hasn't run after adding the new container tab. Resolves brave/brave-browser#52824
This commit is contained in:
@@ -884,6 +884,7 @@ IN_PROC_BROWSER_TEST_F(ContainersBrowserTest, ShouldShowTabAccent) {
|
||||
EXPECT_TRUE(tab_strip->ShouldPaintTabAccent(tab_in_container));
|
||||
|
||||
// The standard tab should show large accent icon
|
||||
RunScheduledLayouts();
|
||||
EXPECT_TRUE(tab_in_container->ShouldShowLargeAccentIcon());
|
||||
|
||||
// A pinned tab should not show large accent icon
|
||||
|
||||
Reference in New Issue
Block a user