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

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

Issue 2683033005: URLLoaderMockFactory: clear MemoryCache in unregisterAllURLs (Closed)
Patch Set: 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..044af33b241fce059085b4742cf77bd098d9ac30 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"
@@ -75,6 +76,9 @@ void WebURLLoaderMockFactoryImpl::unregisterURL(const blink::WebURL& url) {
void WebURLLoaderMockFactoryImpl::unregisterAllURLs() {
url_to_response_info_.clear();
url_to_error_info_.clear();
+ MemoryCache* cache = memoryCache();
+ if (cache)
+ cache->evictResources();
}
void WebURLLoaderMockFactoryImpl::serveAsynchronousRequests() {

Powered by Google App Engine
This is Rietveld 408576698