Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(776)

Unified Diff: third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc

Issue 2306303003: Cancel RawResource asynchronously in allClientsAndObserversRemoved() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b88005c8c6f548a2c9feb62d53f15b35251deef3..d3665956a9b77482fb9e5c2a89f7c98ff27bda42 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();
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698