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

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

Issue 2683033005: URLLoaderMockFactory: clear MemoryCache in unregisterAllURLs (Closed)
Patch Set: fix Created 3 years, 10 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
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 a5704c040299ed50db47d2af331fee0e83923945..9d60cd27cd816532086b8c22c488c85fec66c658 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
@@ -8,6 +8,7 @@
#include "base/files/file_util.h"
#include "base/run_loop.h"
+#include "platform/loader/fetch/MemoryCache.h"
#include "platform/testing/TestingPlatformSupport.h"
#include "platform/testing/UnitTestHelpers.h"
#include "platform/testing/weburl_loader_mock.h"
@@ -72,9 +73,10 @@ void WebURLLoaderMockFactoryImpl::unregisterURL(const blink::WebURL& url) {
url_to_error_info_.remove(error_iter);
}
-void WebURLLoaderMockFactoryImpl::unregisterAllURLs() {
+void WebURLLoaderMockFactoryImpl::unregisterAllURLsAndClearMemoryCache() {
url_to_response_info_.clear();
url_to_error_info_.clear();
+ memoryCache()->evictResources();
}
void WebURLLoaderMockFactoryImpl::serveAsynchronousRequests() {

Powered by Google App Engine
This is Rietveld 408576698