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

Unified Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added printfs to debug timeout which doesn't happen locally 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/find_bar/find_bar_host_browsertest.cc
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index d79b6a41d3673bc0d897088aba62f578e9533155..44b14ff75fd638739382e6cab4bf2285d5a151e8 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -750,6 +750,10 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindMovesWhenObscuring) {
// Search for something guaranteed not to be obscured by the Find box.
EXPECT_EQ(1, FindInPageWchar(tab, L"Done",
kFwd, kIgnoreCase, &ordinal));
+
+ // Drain MessageLoop so that find bar position settles.
+ ui_test_utils::RunAllPendingInMessageLoop();
+
// Check the position.
EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
EXPECT_TRUE(fully_visible);
@@ -766,6 +770,9 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindMovesWhenObscuring) {
EXPECT_EQ(0, FindInPageWchar(tab, L"WeirdSearchString",
kFwd, kIgnoreCase, &ordinal));
+ // Drain MessageLoop so that find bar position settles.
+ ui_test_utils::RunAllPendingInMessageLoop();
+
// Check the position.
EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
EXPECT_TRUE(fully_visible);

Powered by Google App Engine
This is Rietveld 408576698