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

Unified Diff: webkit/support/weburl_loader_mock_factory.cc

Issue 11940002: Support WebCore's memory cache reusing main resources in unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/weburl_loader_mock_factory.cc
===================================================================
--- webkit/support/weburl_loader_mock_factory.cc (revision 177172)
+++ webkit/support/weburl_loader_mock_factory.cc (working copy)
@@ -10,8 +10,11 @@
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
+#include "webkit/support/webkit_support.h"
#include "webkit/support/weburl_loader_mock.h"
+using WebKit::WebCache;
using WebKit::WebData;
using WebKit::WebString;
using WebKit::WebURL;
@@ -73,6 +76,7 @@
void WebURLLoaderMockFactory::UnregisterAllURLs() {
url_to_reponse_info_.clear();
url_to_error_info_.clear();
+ WebCache::clear();
}
void WebURLLoaderMockFactory::ServeAsynchronousRequests() {
@@ -103,6 +107,7 @@
// The loader might have already been removed.
pending_loaders_.erase(loader);
}
+ webkit_support::RunAllPendingMessages();
}
WebKit::WebURLRequest
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698