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

Side by Side Diff: third_party/crashpad/crashpad/util/net/http_transport_test.cc

Issue 2773813002: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 (Closed)
Patch Set: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 Created 3 years, 9 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 unified diff | Download patch
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const HTTPHeaders& headers() { return headers_; } 74 const HTTPHeaders& headers() { return headers_; }
75 75
76 private: 76 private:
77 void MultiprocessParent() override { 77 void MultiprocessParent() override {
78 // Use Logging*File() instead of Checked*File() so that the test can fail 78 // Use Logging*File() instead of Checked*File() so that the test can fail
79 // gracefully with a gtest assertion if the child does not execute properly. 79 // gracefully with a gtest assertion if the child does not execute properly.
80 80
81 // The child will write the HTTP server port number as a packed unsigned 81 // The child will write the HTTP server port number as a packed unsigned
82 // short to stdout. 82 // short to stdout.
83 uint16_t port; 83 uint16_t port;
84 ASSERT_TRUE(LoggingReadFile(ReadPipeHandle(), &port, sizeof(port))); 84 ASSERT_TRUE(LoggingReadFileExactly(ReadPipeHandle(), &port, sizeof(port)));
85 85
86 // Then the parent will tell the web server what response code to send 86 // Then the parent will tell the web server what response code to send
87 // for the HTTP request. 87 // for the HTTP request.
88 ASSERT_TRUE(LoggingWriteFile( 88 ASSERT_TRUE(LoggingWriteFile(
89 WritePipeHandle(), &response_code_, sizeof(response_code_))); 89 WritePipeHandle(), &response_code_, sizeof(response_code_)));
90 90
91 // The parent will also tell the web server what response body to send back. 91 // The parent will also tell the web server what response body to send back.
92 // The web server will only send the response body if the response code is 92 // The web server will only send the response body if the response code is
93 // 200. 93 // 200.
94 const std::string random_string = RandomString(); 94 const std::string random_string = RandomString();
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 324 }
325 325
326 TEST(HTTPTransport, Upload33k_LengthUnknown) { 326 TEST(HTTPTransport, Upload33k_LengthUnknown) {
327 // The same as Upload33k, but without declaring Content-Length ahead of time. 327 // The same as Upload33k, but without declaring Content-Length ahead of time.
328 RunUpload33k(false); 328 RunUpload33k(false);
329 } 329 }
330 330
331 } // namespace 331 } // namespace
332 } // namespace test 332 } // namespace test
333 } // namespace crashpad 333 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698