Index: chrome/browser/ui/panels/panel_browsertest.cc |
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc |
index 954a9e5c9ed616794790fca796f495c652609ebb..75bd4f867d18b2512cd6ac55187e51bcc07e4852 100644 |
--- a/chrome/browser/ui/panels/panel_browsertest.cc |
+++ b/chrome/browser/ui/panels/panel_browsertest.cc |
@@ -882,6 +882,8 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, |
} |
IN_PROC_BROWSER_TEST_F(PanelBrowserTest, ChangeAutoHideTaskBarThickness) { |
+ ASSERT_TRUE(base::MessageLoopForUI::IsCurrent()); |
+ |
PanelManager* manager = PanelManager::GetInstance(); |
DockedPanelCollection* docked_collection = manager->docked_collection(); |
int initial_starting_right_position = |
@@ -920,7 +922,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, ChangeAutoHideTaskBarThickness) { |
mock_display_settings_provider()->SetDesktopBarThickness( |
DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_RIGHT, |
right_bar_thickness); |
- base::MessageLoopForUI::current()->RunUntilIdle(); |
+ base::RunLoop().RunUntilIdle(); |
EXPECT_EQ(initial_starting_right_position, |
docked_collection->StartingRightPosition()); |
EXPECT_EQ(docked_collection->work_area().bottom() - bottom_bar_thickness, |
@@ -939,7 +941,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, ChangeAutoHideTaskBarThickness) { |
mock_display_settings_provider()->SetDesktopBarThickness( |
DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_RIGHT, |
right_bar_thickness); |
- base::MessageLoopForUI::current()->RunUntilIdle(); |
+ base::RunLoop().RunUntilIdle(); |
EXPECT_EQ(docked_collection->StartingRightPosition(), |
initial_starting_right_position); |
EXPECT_EQ(docked_collection->work_area().bottom() - bottom_bar_thickness, |