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

Unified Diff: chrome/browser/net/gaia/token_service_unittest.cc

Issue 8274012: Wait for URLBlacklist update tasks on automation tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added BrowserThread::WaitForPendingTasksOn, removed SignalingTask Created 9 years, 2 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/net/gaia/token_service_unittest.cc
diff --git a/chrome/browser/net/gaia/token_service_unittest.cc b/chrome/browser/net/gaia/token_service_unittest.cc
index 72994c69208abb016c0306f677cdebaf60933c36..b4a214a6b6b8632adf061e33c7b59c4fee1fedc3 100644
--- a/chrome/browser/net/gaia/token_service_unittest.cc
+++ b/chrome/browser/net/gaia/token_service_unittest.cc
@@ -90,10 +90,7 @@ void TokenServiceTestHarness::WaitForDBLoadCompletion() {
// The WebDB does all work on the DB thread. This will add an event
// to the end of the DB thread, so when we reach this task, all DB
// operations should be complete.
- base::WaitableEvent done(false, false);
- BrowserThread::PostTask(
- BrowserThread::DB, FROM_HERE, new SignalingTask(&done));
- done.Wait();
+ CHECK(BrowserThread::WaitForPendingTasksOn(BrowserThread::DB));
// Notifications should be returned from the DB thread onto the UI thread.
message_loop_.RunAllPending();

Powered by Google App Engine
This is Rietveld 408576698