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

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

Issue 2510333002: Send encoded_body_length to renderer when response completed (2/3) (Closed)
Patch Set: rebase Created 4 years, 1 month 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.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 8f74d5286e28f205e723c55de1abb91f78f319a7..abbb94ef246928e59757d9fe2a10bd878466a5f4 100644
--- a/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
+++ b/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc
@@ -49,7 +49,7 @@ void WebURLLoaderMock::ServeAsynchronousRequest(
return;
if (error.reason) {
- delegate->didFail(client_, this, error, data.size());
+ delegate->didFail(client_, this, error, data.size(), 0);
return;
}
delegate->didReceiveData(client_, this, data.data(), data.size(),
@@ -57,7 +57,7 @@ void WebURLLoaderMock::ServeAsynchronousRequest(
if (!self)
return;
- delegate->didFinishLoading(client_, this, 0, data.size());
+ delegate->didFinishLoading(client_, this, 0, data.size(), data.size());
}
WebURLRequest WebURLLoaderMock::ServeRedirect(
@@ -99,7 +99,8 @@ void WebURLLoaderMock::loadSynchronously(const WebURLRequest& request,
WebURLResponse& response,
WebURLError& error,
WebData& data,
- int64_t& encoded_data_length) {
+ int64_t& encoded_data_length,
+ int64_t& encoded_body_length) {
if (factory_->IsMockedURL(request.url())) {
factory_->LoadSynchronously(request, &response, &error, &data,
&encoded_data_length);
@@ -110,7 +111,7 @@ void WebURLLoaderMock::loadSynchronously(const WebURLRequest& request,
<< request.url().string().utf8();
using_default_loader_ = true;
default_loader_->loadSynchronously(request, response, error, data,
- encoded_data_length);
+ encoded_data_length, encoded_body_length);
}
void WebURLLoaderMock::loadAsynchronously(const WebURLRequest& request,

Powered by Google App Engine
This is Rietveld 408576698