Index: content/browser/fileapi/blob_storage_context_unittest.cc |
diff --git a/content/browser/fileapi/blob_storage_context_unittest.cc b/content/browser/fileapi/blob_storage_context_unittest.cc |
index fd588801532f10b9062662e7197ddf2a0b8a3485..05498b50d51e5111456a99a0291836f5cc97f4bb 100644 |
--- a/content/browser/fileapi/blob_storage_context_unittest.cc |
+++ b/content/browser/fileapi/blob_storage_context_unittest.cc |
@@ -41,6 +41,7 @@ TEST(BlobStorageContextTest, IncrementDecrementRef) { |
blob_data_handle = context.GetBlobDataFromUUID(kId); |
EXPECT_TRUE(blob_data_handle); |
blob_data_handle.reset(); |
+ fake_io_message_loop.RunUntilIdle(); |
// Make sure its still there after inc/dec. |
EXPECT_TRUE(host.IncrementBlobRefCount(kId)); |
@@ -48,6 +49,7 @@ TEST(BlobStorageContextTest, IncrementDecrementRef) { |
blob_data_handle = context.GetBlobDataFromUUID(kId); |
EXPECT_TRUE(blob_data_handle); |
blob_data_handle.reset(); |
+ fake_io_message_loop.RunUntilIdle(); |
// Make sure it goes away in the end. |
EXPECT_TRUE(host.DecrementBlobRefCount(kId)); |
@@ -82,6 +84,7 @@ TEST(BlobStorageContextTest, BlobDataHandle) { |
// Should disappear after dropping both handles. |
blob_data_handle.reset(); |
another_handle.reset(); |
+ fake_io_message_loop.RunUntilIdle(); |
blob_data_handle = context.GetBlobDataFromUUID(kId); |
EXPECT_FALSE(blob_data_handle); |
} |
@@ -150,6 +153,7 @@ TEST(BlobStorageContextTest, PublicBlobUrls) { |
ASSERT_TRUE(blob_data_handle.get()); |
EXPECT_EQ(kId, blob_data_handle->data()->uuid()); |
blob_data_handle.reset(); |
+ fake_io_message_loop.RunUntilIdle(); |
// The url registration should keep the blob alive even after |
// explicit references are dropped. |
@@ -157,6 +161,7 @@ TEST(BlobStorageContextTest, PublicBlobUrls) { |
blob_data_handle = context.GetBlobDataFromPublicURL(kUrl); |
EXPECT_TRUE(blob_data_handle); |
blob_data_handle.reset(); |
+ fake_io_message_loop.RunUntilIdle(); |
// Finally get rid of the url registration and the blob. |
EXPECT_TRUE(host.RevokePublicBlobURL(kUrl)); |