Index: content/browser/loader/resource_dispatcher_host_unittest.cc |
diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc |
index 58ab2d130de3b48e182428775f96848d09560f55..be4941f681720188b0ccdd2d4da68c41cb48f4f4 100644 |
--- a/content/browser/loader/resource_dispatcher_host_unittest.cc |
+++ b/content/browser/loader/resource_dispatcher_host_unittest.cc |
@@ -2569,6 +2569,7 @@ TEST_P(ResourceDispatcherHostTest, IgnoreCancelForDownloads) { |
// Return some data so that the request is identified as a download |
// and the proper resource handlers are created. |
EXPECT_TRUE(net::URLRequestTestJob::ProcessOnePendingMessage()); |
+ base::MessageLoop::current()->RunUntilIdle(); |
// And now simulate a cancellation coming from the renderer. |
ResourceHostMsg_CancelRequest msg(request_id); |
@@ -3028,6 +3029,7 @@ TEST_P(ResourceDispatcherHostTest, TransferNavigationText) { |
// Flush all the pending requests to get the response through the |
// MimeTypeResourceHandler. |
while (net::URLRequestTestJob::ProcessOnePendingMessage()) {} |
+ base::MessageLoop::current()->RunUntilIdle(); |
// Restore, now that we've set up a transfer. |
SetBrowserClientForTesting(old_client); |
@@ -3196,6 +3198,7 @@ TEST_P(ResourceDispatcherHostTest, TransferNavigationWithTwoRedirects) { |
// Flush all the pending requests to get the response through the |
// MimeTypeResourceHandler. |
while (net::URLRequestTestJob::ProcessOnePendingMessage()) {} |
+ base::MessageLoop::current()->RunUntilIdle(); |
// Restore. |
SetBrowserClientForTesting(old_client); |