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

Unified Diff: content/child/shared_memory_data_consumer_handle_unittest.cc

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Initialise encoded_body_length for sync XHR to data: URLs Created 4 years, 5 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: content/child/shared_memory_data_consumer_handle_unittest.cc
diff --git a/content/child/shared_memory_data_consumer_handle_unittest.cc b/content/child/shared_memory_data_consumer_handle_unittest.cc
index 94734a8f9a336c002287dbfe896391a48f066af3..29ea0f2d6dd941f0793bc3aba6674af6fa366ab9 100644
--- a/content/child/shared_memory_data_consumer_handle_unittest.cc
+++ b/content/child/shared_memory_data_consumer_handle_unittest.cc
@@ -82,7 +82,12 @@ class LoggingFixedReceivedData final : public RequestPeer::ReceivedData {
return data_.empty() ? nullptr : &data_[0];
}
int length() const override { return static_cast<int>(data_.size()); }
- int encoded_length() const override { return static_cast<int>(data_.size()); }
+ int encoded_data_length() const override {
+ return static_cast<int>(data_.size());
+ }
+ int encoded_body_length() const override {
+ return static_cast<int>(data_.size());
+ }
private:
const std::string name_;
@@ -197,7 +202,8 @@ class SharedMemoryDataConsumerHandleTest
handle_.reset(new SharedMemoryDataConsumerHandle(GetParam(), &writer_));
}
std::unique_ptr<FixedReceivedData> NewFixedData(const char* s) {
- return base::WrapUnique(new FixedReceivedData(s, strlen(s), strlen(s)));
+ auto size = strlen(s);
+ return base::WrapUnique(new FixedReceivedData(s, size, size, size));
}
StrictMock<MockClient> client_;
« no previous file with comments | « content/child/shared_memory_data_consumer_handle.cc ('k') | content/child/shared_memory_received_data_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698