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; |
} |