Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2345)

Unified Diff: chrome/browser/ui/panels/base_panel_browser_test.cc

Issue 10689082: Fix flaky linux panel tests related to active state checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up log msgs. Add fix to new tests. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/panels/base_panel_browser_test.cc
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 764a9e4ce8e6abd7d8238d0b6c792806bc6d5371..1edc5bcec9575962801c6da4d83916cfd8ad5a52 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -328,14 +328,16 @@ Panel* BasePanelBrowserTest::CreatePanelWithParams(
}
if (params.wait_for_fully_created) {
- MessageLoopForUI::current()->RunAllPending();
-
#if defined(OS_LINUX)
// On bots, we might have a simple window manager which always activates new
// windows, and can't always deactivate them. Re-activate the main tabbed
// browser to "deactivate" the newly created panel.
if (params.expected_active_state == SHOW_AS_INACTIVE &&
ui::GuessWindowManager() == ui::WM_ICE_WM) {
+ // Wait for new panel to become active before deactivating to ensure
+ // the activated notification is consumed before we wait for the panel
+ // to become inactive.
+ WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
browser()->window()->Activate();
}
#endif

Powered by Google App Engine
This is Rietveld 408576698