Index: chrome/browser/sync/glue/sync_backend_registrar_unittest.cc |
diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc |
index 3db65e9aa8506800906545295e371b71596ff562..34adb95c58be3837c71f0c6b9987fdf1040df44b 100644 |
--- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc |
+++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc |
@@ -336,6 +336,9 @@ TEST_F(SyncBackendRegistrarShutdownTest, BlockingShutdown) { |
base::Bind(&SyncBackendRegistrar::Shutdown, |
base::Unretained(registrar.release()))); |
+ // Make sure the thread starts running. |
+ sync_thread->WaitUntilThreadStarted(); |
+ |
// The test verifies that the sync thread doesn't block because |
// of the blocked DB thread and can finish the shutdown. |
sync_thread->message_loop()->RunUntilIdle(); |