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

Side by Side Diff: util/net/http_body_test.cc

Issue 707223002: In CompositeHTTPBodyStream, coalesce small GetBytesBuffer()s to better fill the buffer. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « util/net/http_body.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 CompositeHTTPBodyStream stream(parts); 208 CompositeHTTPBodyStream stream(parts);
209 209
210 std::string expected_string = string1 + "This is a test.\n" + string2; 210 std::string expected_string = string1 + "This is a test.\n" + string2;
211 std::string actual_string = ReadStreamToString(&stream, GetParam()); 211 std::string actual_string = ReadStreamToString(&stream, GetParam());
212 EXPECT_EQ(expected_string, actual_string); 212 EXPECT_EQ(expected_string, actual_string);
213 } 213 }
214 214
215 INSTANTIATE_TEST_CASE_P(VariableBufferSize, 215 INSTANTIATE_TEST_CASE_P(VariableBufferSize,
216 CompositeHTTPBodyStreamBufferSize, 216 CompositeHTTPBodyStreamBufferSize,
217 testing::Values(1, 2, 9, 16, 31, 128)); 217 testing::Values(1, 2, 9, 16, 31, 128, 1024));
218 218
219 } // namespace 219 } // namespace
220 } // namespace test 220 } // namespace test
221 } // namespace crashpad 221 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/net/http_body.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698