OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "net/http/http_transaction.h" | 9 #include "net/http/http_transaction.h" |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 base::Time request_time; | 55 base::Time request_time; |
56 const char* request_headers; | 56 const char* request_headers; |
57 int load_flags; | 57 int load_flags; |
58 const char* status; | 58 const char* status; |
59 const char* response_headers; | 59 const char* response_headers; |
60 // If |response_time| is unspecified, the current time will be used. | 60 // If |response_time| is unspecified, the current time will be used. |
61 base::Time response_time; | 61 base::Time response_time; |
62 const char* data; | 62 const char* data; |
63 int test_mode; | 63 int test_mode; |
64 MockTransactionHandler handler; | 64 MockTransactionHandler handler; |
65 int cert_status; | 65 net::CertStatus cert_status; |
66 }; | 66 }; |
67 | 67 |
68 extern const MockTransaction kSimpleGET_Transaction; | 68 extern const MockTransaction kSimpleGET_Transaction; |
69 extern const MockTransaction kSimplePOST_Transaction; | 69 extern const MockTransaction kSimplePOST_Transaction; |
70 extern const MockTransaction kTypicalGET_Transaction; | 70 extern const MockTransaction kTypicalGET_Transaction; |
71 extern const MockTransaction kETagGET_Transaction; | 71 extern const MockTransaction kETagGET_Transaction; |
72 extern const MockTransaction kRangeGET_Transaction; | 72 extern const MockTransaction kRangeGET_Transaction; |
73 | 73 |
74 // returns the mock transaction for the given URL | 74 // returns the mock transaction for the given URL |
75 const MockTransaction* FindMockTransaction(const GURL& url); | 75 const MockTransaction* FindMockTransaction(const GURL& url); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 bool done_reading_called_; | 218 bool done_reading_called_; |
219 }; | 219 }; |
220 | 220 |
221 //----------------------------------------------------------------------------- | 221 //----------------------------------------------------------------------------- |
222 // helpers | 222 // helpers |
223 | 223 |
224 // read the transaction completely | 224 // read the transaction completely |
225 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 225 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
226 | 226 |
227 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 227 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
OLD | NEW |