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

Unified Diff: base/threading/worker_pool_unittest.cc

Issue 10810061: Give the post-and-reply worker pool test a chance to finish on iOS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/worker_pool_unittest.cc
diff --git a/base/threading/worker_pool_unittest.cc b/base/threading/worker_pool_unittest.cc
index 10ca4f151183415371d86e91bcae266791848f36..5021b2f73304f25c9365af97005d67ce3361fcee 100644
--- a/base/threading/worker_pool_unittest.cc
+++ b/base/threading/worker_pool_unittest.cc
@@ -98,6 +98,11 @@ TEST_F(WorkerPoolTest, MAYBE_PostTaskAndReply) {
const TimeDelta kMaxDuration = TestTimeouts::tiny_timeout();
TimeTicks start = TimeTicks::Now();
while (!tester->finished() && TimeTicks::Now() - start < kMaxDuration) {
+#if defined(OS_IOS)
+ // Ensure that the other thread has a chance to run even on a single-core
+ // device.
+ pthread_yield_np();
+#endif
MessageLoop::current()->RunAllPending();
}
EXPECT_TRUE(tester->finished());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698