| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
| 8 #include "net/http/http_transaction.h" | 8 #include "net/http/http_transaction.h" |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 net::CertStatus cert_status; | 65 net::CertStatus cert_status; |
| 66 // Value returned by MockNetworkTransaction::Start (potentially |
| 67 // asynchronously if |!(test_mode & TEST_MODE_SYNC_NET_START)|.) |
| 68 net::Error return_code; |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 extern const MockTransaction kSimpleGET_Transaction; | 71 extern const MockTransaction kSimpleGET_Transaction; |
| 69 extern const MockTransaction kSimplePOST_Transaction; | 72 extern const MockTransaction kSimplePOST_Transaction; |
| 70 extern const MockTransaction kTypicalGET_Transaction; | 73 extern const MockTransaction kTypicalGET_Transaction; |
| 71 extern const MockTransaction kETagGET_Transaction; | 74 extern const MockTransaction kETagGET_Transaction; |
| 72 extern const MockTransaction kRangeGET_Transaction; | 75 extern const MockTransaction kRangeGET_Transaction; |
| 73 | 76 |
| 74 // returns the mock transaction for the given URL | 77 // returns the mock transaction for the given URL |
| 75 const MockTransaction* FindMockTransaction(const GURL& url); | 78 const MockTransaction* FindMockTransaction(const GURL& url); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 bool done_reading_called_; | 230 bool done_reading_called_; |
| 228 }; | 231 }; |
| 229 | 232 |
| 230 //----------------------------------------------------------------------------- | 233 //----------------------------------------------------------------------------- |
| 231 // helpers | 234 // helpers |
| 232 | 235 |
| 233 // read the transaction completely | 236 // read the transaction completely |
| 234 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 237 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
| 235 | 238 |
| 236 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 239 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| OLD | NEW |