| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 scoped_ptr<HTTPBodyStream> body_stream, | 43 scoped_ptr<HTTPBodyStream> body_stream, |
| 44 uint16_t http_response_code, | 44 uint16_t http_response_code, |
| 45 RequestValidator request_validator) | 45 RequestValidator request_validator) |
| 46 : MultiprocessExec(), | 46 : MultiprocessExec(), |
| 47 headers_(headers), | 47 headers_(headers), |
| 48 body_stream_(body_stream.Pass()), | 48 body_stream_(body_stream.Pass()), |
| 49 response_code_(http_response_code), | 49 response_code_(http_response_code), |
| 50 request_validator_(request_validator) { | 50 request_validator_(request_validator) { |
| 51 // TODO(rsesek): Use a more robust mechanism to locate testdata | 51 // TODO(rsesek): Use a more robust mechanism to locate testdata |
| 52 // <https://code.google.com/p/crashpad/issues/detail?id=4>. | 52 // <https://code.google.com/p/crashpad/issues/detail?id=4>. |
| 53 SetChildCommand("util/net/http_transport_test_server.py", nullptr); | 53 std::vector<std::string> args; |
| 54 args.push_back("util/net/http_transport_test_server.py"); |
| 55 SetChildCommand("d:\\src\\depot_tools\\python276_bin\\python.exe", &args); |
| 54 } | 56 } |
| 55 | 57 |
| 56 const HTTPHeaders& headers() { return headers_; } | 58 const HTTPHeaders& headers() { return headers_; } |
| 57 | 59 |
| 58 private: | 60 private: |
| 59 void MultiprocessParent() override { | 61 void MultiprocessParent() override { |
| 60 // Use Logging*File() instead of Checked*File() so that the test can fail | 62 // Use Logging*File() instead of Checked*File() so that the test can fail |
| 61 // gracefully with a gtest assertion if the child does not execute properly. | 63 // gracefully with a gtest assertion if the child does not execute properly. |
| 62 | 64 |
| 63 // The child will write the HTTP server port number as a packed unsigned | 65 // The child will write the HTTP server port number as a packed unsigned |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 headers[kContentLength] = base::StringPrintf("%zu", strlen(kTextBody)); | 239 headers[kContentLength] = base::StringPrintf("%zu", strlen(kTextBody)); |
| 238 | 240 |
| 239 HTTPTransportTestFixture test(headers, body_stream.Pass(), 200, | 241 HTTPTransportTestFixture test(headers, body_stream.Pass(), 200, |
| 240 &UnchunkedPlainText); | 242 &UnchunkedPlainText); |
| 241 test.Run(); | 243 test.Run(); |
| 242 } | 244 } |
| 243 | 245 |
| 244 } // namespace | 246 } // namespace |
| 245 } // namespace test | 247 } // namespace test |
| 246 } // namespace crashpad | 248 } // namespace crashpad |
| OLD | NEW |