Index: net/ssl/server_bound_cert_service_unittest.cc |
diff --git a/net/ssl/server_bound_cert_service_unittest.cc b/net/ssl/server_bound_cert_service_unittest.cc |
index 0063f496036854c4c3a1ae2be4cbc1dea394ae66..0476379a90afbb4970f56dfc390f7635fa89d8ce 100644 |
--- a/net/ssl/server_bound_cert_service_unittest.cc |
+++ b/net/ssl/server_bound_cert_service_unittest.cc |
@@ -529,6 +529,12 @@ TEST_F(ServerBoundCertServiceTest, AsyncStoreGetNoCertsInStore) { |
mock_store->CallGetServerBoundCertCallbackWithResult( |
ERR_FILE_NOT_FOUND, base::Time(), std::string(), std::string()); |
+ // Wait for generation to finish. |
+ sequenced_worker_pool_->FlushForTesting(); |
+ // Wait for reply from the ServerBoundCertServiceWorkers to be posted back to |
+ // the ServerBoundCertService. (There will be more than two, one to track the |
+ // failing lookup, and another to track the generation of the cert.) |
+ base::MessageLoop::current()->RunUntilIdle(); |
error = callback.WaitForResult(); |
EXPECT_EQ(OK, error); |
@@ -560,6 +566,9 @@ TEST_F(ServerBoundCertServiceTest, AsyncStoreGetOneCertInStore) { |
mock_store->CallGetServerBoundCertCallbackWithResult( |
OK, base::Time(), "ab", "cd"); |
+ // Wait for reply from ServerBoundCertServiceWorker to be posted back to the |
+ // ServerBoundCertService. |
+ base::MessageLoop::current()->RunUntilIdle(); |
juanlang
2013/08/09 04:48:52
But here I believe I don't need to Flush(), becaus
|
error = callback.WaitForResult(); |
EXPECT_EQ(OK, error); |