| OLD | NEW |
| 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, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. | 13 // limitations under the License. |
| 14 | 14 |
| 15 #include "util/net/http_body.h" | 15 #include "util/net/http_body.h" |
| 16 | 16 |
| 17 #include "gtest/gtest.h" | 17 #include "gtest/gtest.h" |
| 18 #include "test/paths.h" | 18 #include "test/paths.h" |
| 19 #include "util/misc/implicit_cast.h" |
| 19 #include "util/net/http_body_test_util.h" | 20 #include "util/net/http_body_test_util.h" |
| 20 | 21 |
| 21 namespace crashpad { | 22 namespace crashpad { |
| 22 namespace test { | 23 namespace test { |
| 23 namespace { | 24 namespace { |
| 24 | 25 |
| 25 void ExpectBufferSet(const uint8_t* actual, | 26 void ExpectBufferSet(const uint8_t* actual, |
| 26 uint8_t expected_byte, | 27 uint8_t expected_byte, |
| 27 size_t num_expected_bytes) { | 28 size_t num_expected_bytes) { |
| 28 for (size_t i = 0; i < num_expected_bytes; ++i) { | 29 for (size_t i = 0; i < num_expected_bytes; ++i) { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 EXPECT_EQ(expected_string, actual_string); | 209 EXPECT_EQ(expected_string, actual_string); |
| 209 } | 210 } |
| 210 | 211 |
| 211 INSTANTIATE_TEST_CASE_P(VariableBufferSize, | 212 INSTANTIATE_TEST_CASE_P(VariableBufferSize, |
| 212 CompositeHTTPBodyStreamBufferSize, | 213 CompositeHTTPBodyStreamBufferSize, |
| 213 testing::Values(1, 2, 9, 16, 31, 128, 1024)); | 214 testing::Values(1, 2, 9, 16, 31, 128, 1024)); |
| 214 | 215 |
| 215 } // namespace | 216 } // namespace |
| 216 } // namespace test | 217 } // namespace test |
| 217 } // namespace crashpad | 218 } // namespace crashpad |
| OLD | NEW |