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

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

Issue 2051243002: Drop ResourceLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startLoad
Patch Set: Rebase Created 4 years, 3 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/platform/testing/weburl_loader_mock.h ('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.cc
diff --git a/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc b/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
index 588fd5d1b9ebc617f40c7c95d724698bc12fdc97..f55d7fd1542fe4dd90f0a5b13653310700085f88 100644
--- a/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
+++ b/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
@@ -121,8 +121,8 @@ void WebURLLoaderMock::loadSynchronously(const WebURLRequest& request,
void WebURLLoaderMock::loadAsynchronously(const WebURLRequest& request,
WebURLLoaderClient* client) {
DCHECK(client);
+ client_ = client;
if (factory_->IsMockedURL(request.url())) {
- client_ = client;
factory_->LoadAsynchronouly(request, this);
return;
}
@@ -130,7 +130,7 @@ void WebURLLoaderMock::loadAsynchronously(const WebURLRequest& request,
<< "loadAsynchronously shouldn't be falling back: "
<< request.url().string().utf8();
using_default_loader_ = true;
- default_loader_->loadAsynchronously(request, client);
+ default_loader_->loadAsynchronously(request, this);
}
void WebURLLoaderMock::cancel() {
@@ -167,4 +167,24 @@ WeakPtr<WebURLLoaderMock> WebURLLoaderMock::GetWeakPtr() {
return weak_factory_.createWeakPtr();
}
+void WebURLLoaderMock::didReceiveResponse(WebURLLoader*, const WebURLResponse& response) {
+ client_->didReceiveResponse(this, response);
+}
+
+void WebURLLoaderMock::didReceiveResponse(WebURLLoader*, const WebURLResponse& response, WebDataConsumerHandle* handle) {
+ client_->didReceiveResponse(this, response, handle);
+}
+
+void WebURLLoaderMock::didReceiveData(WebURLLoader*, const char* data, int dataLength, int encodedDataLength, int encodedBodyLength) {
+ client_->didReceiveData(this, data, dataLength, encodedDataLength, encodedBodyLength);
+}
+
+void WebURLLoaderMock::didFinishLoading(WebURLLoader*, double finishTime, int64_t encodedDataLength) {
+ client_->didFinishLoading(this, finishTime, encodedDataLength);
+}
+
+void WebURLLoaderMock::didFail(WebURLLoader*, const WebURLError& error) {
+ client_->didFail(this, error);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/testing/weburl_loader_mock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698