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:
Netzenbot
2026-02-17 06:53:39 -05:00
committed by GitHub
parent 726a192a51
commit bb28707484
@@ -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