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

Unified Diff: chrome/test/ui/ui_test.cc

Issue 43046: Hopefully make DownloadTest.UnknownSize not-flaky. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 9 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
« no previous file with comments | « chrome/browser/download/download_uitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ui/ui_test.cc
===================================================================
--- chrome/test/ui/ui_test.cc (revision 11375)
+++ chrome/test/ui/ui_test.cc (working copy)
@@ -498,14 +498,14 @@
bool UITest::WaitForDownloadShelfVisible(TabProxy* tab) {
const int kCycles = 20;
for (int i = 0; i < kCycles; i++) {
+ // Give it a chance to catch up.
+ PlatformThread::Sleep(action_max_timeout_ms() / kCycles);
+
bool visible = false;
if (!tab->IsShelfVisible(&visible))
- return false; // Some error.
+ continue;
if (visible)
return true; // Got the download shelf.
-
- // Give it a chance to catch up.
- PlatformThread::Sleep(action_max_timeout_ms() / kCycles);
}
return false;
}
« no previous file with comments | « chrome/browser/download/download_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698