| 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, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 #include "base/files/file_path.h" | 23 #include "base/files/file_path.h" |
| 24 #include "base/format_macros.h" | 24 #include "base/format_macros.h" |
| 25 #include "base/logging.h" | 25 #include "base/logging.h" |
| 26 #include "base/memory/scoped_ptr.h" | 26 #include "base/memory/scoped_ptr.h" |
| 27 #include "base/rand_util.h" | 27 #include "base/rand_util.h" |
| 28 #include "base/strings/stringprintf.h" | 28 #include "base/strings/stringprintf.h" |
| 29 #include "base/strings/utf_string_conversions.h" | 29 #include "base/strings/utf_string_conversions.h" |
| 30 #include "build/build_config.h" | 30 #include "build/build_config.h" |
| 31 #include "gtest/gtest.h" | 31 #include "gtest/gtest.h" |
| 32 #include "test/multiprocess_exec.h" |
| 33 #include "test/paths.h" |
| 32 #include "util/file/file_io.h" | 34 #include "util/file/file_io.h" |
| 33 #include "util/net/http_body.h" | 35 #include "util/net/http_body.h" |
| 34 #include "util/net/http_headers.h" | 36 #include "util/net/http_headers.h" |
| 35 #include "util/net/http_multipart_builder.h" | 37 #include "util/net/http_multipart_builder.h" |
| 36 #include "util/test/multiprocess_exec.h" | |
| 37 #include "util/test/paths.h" | |
| 38 | 38 |
| 39 namespace crashpad { | 39 namespace crashpad { |
| 40 namespace test { | 40 namespace test { |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 class HTTPTransportTestFixture : public MultiprocessExec { | 43 class HTTPTransportTestFixture : public MultiprocessExec { |
| 44 public: | 44 public: |
| 45 using RequestValidator = | 45 using RequestValidator = |
| 46 void(*)(HTTPTransportTestFixture*, const std::string&); | 46 void(*)(HTTPTransportTestFixture*, const std::string&); |
| 47 | 47 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 headers[kContentLength] = base::StringPrintf("%" PRIuS, strlen(kTextBody)); | 274 headers[kContentLength] = base::StringPrintf("%" PRIuS, strlen(kTextBody)); |
| 275 | 275 |
| 276 HTTPTransportTestFixture test(headers, body_stream.Pass(), 200, | 276 HTTPTransportTestFixture test(headers, body_stream.Pass(), 200, |
| 277 &UnchunkedPlainText); | 277 &UnchunkedPlainText); |
| 278 test.Run(); | 278 test.Run(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 } // namespace | 281 } // namespace |
| 282 } // namespace test | 282 } // namespace test |
| 283 } // namespace crashpad | 283 } // namespace crashpad |
| OLD | NEW |