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

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

Issue 1416493006: Change file op |ssize_t|s to FileOperationResult (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 2 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
« no previous file with comments | « util/net/http_transport_mac.mm ('k') | util/net/http_transport_win.cc » ('j') | 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 expect_response_body += "\r\n"; 114 expect_response_body += "\r\n";
115 EXPECT_EQ(expect_response_body, response_body); 115 EXPECT_EQ(expect_response_body, response_body);
116 } else { 116 } else {
117 EXPECT_FALSE(success); 117 EXPECT_FALSE(success);
118 EXPECT_TRUE(response_body.empty()); 118 EXPECT_TRUE(response_body.empty());
119 } 119 }
120 120
121 // Read until the child's stdout closes. 121 // Read until the child's stdout closes.
122 std::string request; 122 std::string request;
123 char buf[32]; 123 char buf[32];
124 ssize_t bytes_read; 124 FileOperationResult bytes_read;
125 while ((bytes_read = ReadFile(ReadPipeHandle(), buf, sizeof(buf))) != 0) { 125 while ((bytes_read = ReadFile(ReadPipeHandle(), buf, sizeof(buf))) != 0) {
126 ASSERT_GE(bytes_read, 0); 126 ASSERT_GE(bytes_read, 0);
127 request.append(buf, bytes_read); 127 request.append(buf, bytes_read);
128 } 128 }
129 129
130 if (request_validator_) 130 if (request_validator_)
131 request_validator_(this, request); 131 request_validator_(this, request);
132 } 132 }
133 133
134 HTTPHeaders headers_; 134 HTTPHeaders headers_;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 307 }
308 308
309 TEST(HTTPTransport, Upload33k_LengthUnknown) { 309 TEST(HTTPTransport, Upload33k_LengthUnknown) {
310 // The same as Upload33k, but without declaring Content-Length ahead of time. 310 // The same as Upload33k, but without declaring Content-Length ahead of time.
311 RunUpload33k(false); 311 RunUpload33k(false);
312 } 312 }
313 313
314 } // namespace 314 } // namespace
315 } // namespace test 315 } // namespace test
316 } // namespace crashpad 316 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/net/http_transport_mac.mm ('k') | util/net/http_transport_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698