| Index: third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
|
| diff --git a/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc b/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
|
| index bfe21a58466f21157e1ca19ca6d727440deb3eb7..997370cc002fdfa2d1ea4a3308e1a4151a484a72 100644
|
| --- a/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
|
| +++ b/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc
|
| @@ -91,13 +91,16 @@ void WebURLLoaderMockFactoryImpl::serveAsynchronousRequests() {
|
| while (response.httpStatusCode() >= 300 &&
|
| response.httpStatusCode() < 400) {
|
| WebURLRequest newRequest = loader->ServeRedirect(request, response);
|
| + base::RunLoop().RunUntilIdle();
|
| if (!loader || loader->is_cancelled() || loader->is_deferred())
|
| break;
|
| LoadRequest(newRequest, &response, &error, &data);
|
| }
|
| // Serve the request if the loader is still active.
|
| - if (loader && !loader->is_cancelled() && !loader->is_deferred())
|
| + if (loader && !loader->is_cancelled() && !loader->is_deferred()) {
|
| loader->ServeAsynchronousRequest(delegate_, response, data, error);
|
| + base::RunLoop().RunUntilIdle();
|
| + }
|
| }
|
| base::RunLoop().RunUntilIdle();
|
| }
|
|
|