[email protected] | 5a07c19 | 2012-07-30 20:18:22 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 4 | |
| 5 | #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| 6 | #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| 7 | |
| 8 | #include "net/http/http_transaction.h" |
| 9 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 10 | #include <string> |
| 11 | |
[email protected] | 2041cf34 | 2010-02-19 03:15:59 | [diff] [blame] | 12 | #include "base/callback.h" |
[email protected] | cad155b | 2008-09-23 14:44:27 | [diff] [blame] | 13 | #include "base/compiler_specific.h" |
[email protected] | 5033ab8 | 2013-03-22 20:17:46 | [diff] [blame] | 14 | #include "base/memory/weak_ptr.h" |
[email protected] | 125ef48 | 2013-06-11 18:32:47 | [diff] [blame] | 15 | #include "base/strings/string16.h" |
[email protected] | 74a85ce | 2009-02-12 00:03:19 | [diff] [blame] | 16 | #include "net/base/io_buffer.h" |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 17 | #include "net/base/load_flags.h" |
[email protected] | d8eb8424 | 2010-09-25 02:25:06 | [diff] [blame] | 18 | #include "net/base/net_errors.h" |
[email protected] | 3b23a22 | 2013-05-15 21:33:25 | [diff] [blame] | 19 | #include "net/base/net_log.h" |
[email protected] | 262eec8 | 2013-03-19 21:01:36 | [diff] [blame] | 20 | #include "net/base/request_priority.h" |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 21 | #include "net/base/test_completion_callback.h" |
| 22 | #include "net/disk_cache/disk_cache.h" |
| 23 | #include "net/http/http_cache.h" |
| 24 | #include "net/http/http_request_info.h" |
[email protected] | 319d9e6f | 2009-02-18 19:47:21 | [diff] [blame] | 25 | #include "net/http/http_response_headers.h" |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 26 | #include "net/http/http_response_info.h" |
| 27 | |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 28 | namespace net { |
[email protected] | 79e1fd6 | 2013-06-20 06:50:04 | [diff] [blame] | 29 | class HttpRequestHeaders; |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 30 | class IOBuffer; |
| 31 | } |
| 32 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 33 | //----------------------------------------------------------------------------- |
| 34 | // mock transaction data |
| 35 | |
| 36 | // these flags may be combined to form the test_mode field |
| 37 | enum { |
| 38 | TEST_MODE_NORMAL = 0, |
| 39 | TEST_MODE_SYNC_NET_START = 1 << 0, |
| 40 | TEST_MODE_SYNC_NET_READ = 1 << 1, |
| 41 | TEST_MODE_SYNC_CACHE_START = 1 << 2, |
| 42 | TEST_MODE_SYNC_CACHE_READ = 1 << 3, |
[email protected] | 73cae57 | 2009-10-22 18:36:19 | [diff] [blame] | 43 | TEST_MODE_SYNC_CACHE_WRITE = 1 << 4, |
[email protected] | 2227c69 | 2010-05-04 15:36:11 | [diff] [blame] | 44 | TEST_MODE_SYNC_ALL = (TEST_MODE_SYNC_NET_START | TEST_MODE_SYNC_NET_READ | |
| 45 | TEST_MODE_SYNC_CACHE_START | TEST_MODE_SYNC_CACHE_READ | |
| 46 | TEST_MODE_SYNC_CACHE_WRITE) |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | typedef void (*MockTransactionHandler)(const net::HttpRequestInfo* request, |
| 50 | std::string* response_status, |
| 51 | std::string* response_headers, |
| 52 | std::string* response_data); |
| 53 | |
| 54 | struct MockTransaction { |
| 55 | const char* url; |
| 56 | const char* method; |
[email protected] | ca2f19e | 2009-09-04 22:53:16 | [diff] [blame] | 57 | // If |request_time| is unspecified, the current time will be used. |
| 58 | base::Time request_time; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 59 | const char* request_headers; |
| 60 | int load_flags; |
| 61 | const char* status; |
| 62 | const char* response_headers; |
[email protected] | 207d58c7 | 2009-09-04 18:59:29 | [diff] [blame] | 63 | // If |response_time| is unspecified, the current time will be used. |
| 64 | base::Time response_time; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 65 | const char* data; |
| 66 | int test_mode; |
| 67 | MockTransactionHandler handler; |
[email protected] | 70d6650 | 2011-09-23 00:55:08 | [diff] [blame] | 68 | net::CertStatus cert_status; |
[email protected] | 2ef5d00e | 2013-03-23 16:17:27 | [diff] [blame] | 69 | // Value returned by MockNetworkTransaction::Start (potentially |
| 70 | // asynchronously if |!(test_mode & TEST_MODE_SYNC_NET_START)|.) |
| 71 | net::Error return_code; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 72 | }; |
| 73 | |
| 74 | extern const MockTransaction kSimpleGET_Transaction; |
| 75 | extern const MockTransaction kSimplePOST_Transaction; |
| 76 | extern const MockTransaction kTypicalGET_Transaction; |
| 77 | extern const MockTransaction kETagGET_Transaction; |
| 78 | extern const MockTransaction kRangeGET_Transaction; |
| 79 | |
| 80 | // returns the mock transaction for the given URL |
| 81 | const MockTransaction* FindMockTransaction(const GURL& url); |
| 82 | |
| 83 | // Add/Remove a mock transaction that can be accessed via FindMockTransaction. |
| 84 | // There can be only one MockTransaction associated with a given URL. |
| 85 | void AddMockTransaction(const MockTransaction* trans); |
| 86 | void RemoveMockTransaction(const MockTransaction* trans); |
| 87 | |
| 88 | struct ScopedMockTransaction : MockTransaction { |
| 89 | ScopedMockTransaction() { |
| 90 | AddMockTransaction(this); |
| 91 | } |
| 92 | explicit ScopedMockTransaction(const MockTransaction& t) |
| 93 | : MockTransaction(t) { |
| 94 | AddMockTransaction(this); |
| 95 | } |
| 96 | ~ScopedMockTransaction() { |
| 97 | RemoveMockTransaction(this); |
| 98 | } |
| 99 | }; |
| 100 | |
| 101 | //----------------------------------------------------------------------------- |
| 102 | // mock http request |
| 103 | |
| 104 | class MockHttpRequest : public net::HttpRequestInfo { |
| 105 | public: |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 106 | explicit MockHttpRequest(const MockTransaction& t); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | //----------------------------------------------------------------------------- |
| 110 | // use this class to test completely consuming a transaction |
| 111 | |
[email protected] | b35f629f | 2011-12-23 02:53:32 | [diff] [blame] | 112 | class TestTransactionConsumer { |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 113 | public: |
[email protected] | 262eec8 | 2013-03-19 21:01:36 | [diff] [blame] | 114 | TestTransactionConsumer(net::RequestPriority priority, |
| 115 | net::HttpTransactionFactory* factory); |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 116 | virtual ~TestTransactionConsumer(); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 117 | |
[email protected] | 9e743cd | 2010-03-16 07:03:53 | [diff] [blame] | 118 | void Start(const net::HttpRequestInfo* request, |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 119 | const net::BoundNetLog& net_log); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 120 | |
| 121 | bool is_done() const { return state_ == DONE; } |
| 122 | int error() const { return error_; } |
| 123 | |
| 124 | const net::HttpResponseInfo* response_info() const { |
| 125 | return trans_->GetResponseInfo(); |
| 126 | } |
| 127 | const std::string& content() const { return content_; } |
| 128 | |
| 129 | private: |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 130 | enum State { |
| 131 | IDLE, |
| 132 | STARTING, |
| 133 | READING, |
| 134 | DONE |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 135 | }; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 136 | |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 137 | void DidStart(int result); |
| 138 | void DidRead(int result); |
| 139 | void DidFinish(int result); |
| 140 | void Read(); |
| 141 | |
[email protected] | b35f629f | 2011-12-23 02:53:32 | [diff] [blame] | 142 | void OnIOComplete(int result); |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 143 | |
| 144 | State state_; |
[email protected] | af4876d | 2008-10-21 23:10:57 | [diff] [blame] | 145 | scoped_ptr<net::HttpTransaction> trans_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 146 | std::string content_; |
[email protected] | 9dea9e1f | 2009-01-29 00:30:47 | [diff] [blame] | 147 | scoped_refptr<net::IOBuffer> read_buf_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 148 | int error_; |
| 149 | |
| 150 | static int quit_counter_; |
| 151 | }; |
| 152 | |
| 153 | //----------------------------------------------------------------------------- |
| 154 | // mock network layer |
| 155 | |
[email protected] | 5c04f72 | 2011-08-12 17:52:47 | [diff] [blame] | 156 | class MockNetworkLayer; |
| 157 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 158 | // This transaction class inspects the available set of mock transactions to |
| 159 | // find data for the request URL. It supports IO operations that complete |
| 160 | // synchronously or asynchronously to help exercise different code paths in the |
| 161 | // HttpCache implementation. |
[email protected] | 5033ab8 | 2013-03-22 20:17:46 | [diff] [blame] | 162 | class MockNetworkTransaction |
| 163 | : public net::HttpTransaction, |
| 164 | public base::SupportsWeakPtr<MockNetworkTransaction> { |
[email protected] | 831e4a3 | 2013-11-14 02:14:44 | [diff] [blame] | 165 | typedef net::WebSocketHandshakeStreamBase::CreateHelper CreateHelper; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 166 | public: |
[email protected] | 262eec8 | 2013-03-19 21:01:36 | [diff] [blame] | 167 | MockNetworkTransaction(net::RequestPriority priority, |
| 168 | MockNetworkLayer* factory); |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 169 | virtual ~MockNetworkTransaction(); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 170 | |
[email protected] | 684970b | 2009-08-14 04:54:46 | [diff] [blame] | 171 | virtual int Start(const net::HttpRequestInfo* request, |
[email protected] | 49639fa | 2011-12-20 23:22:41 | [diff] [blame] | 172 | const net::CompletionCallback& callback, |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 173 | const net::BoundNetLog& net_log) OVERRIDE; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 174 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 175 | virtual int RestartIgnoringLastError( |
[email protected] | 49639fa | 2011-12-20 23:22:41 | [diff] [blame] | 176 | const net::CompletionCallback& callback) OVERRIDE; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 177 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 178 | virtual int RestartWithCertificate( |
| 179 | net::X509Certificate* client_cert, |
[email protected] | 49639fa | 2011-12-20 23:22:41 | [diff] [blame] | 180 | const net::CompletionCallback& callback) OVERRIDE; |
[email protected] | 0b45559b | 2009-06-12 21:45:11 | [diff] [blame] | 181 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 182 | virtual int RestartWithAuth( |
| 183 | const net::AuthCredentials& credentials, |
[email protected] | 49639fa | 2011-12-20 23:22:41 | [diff] [blame] | 184 | const net::CompletionCallback& callback) OVERRIDE; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 185 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 186 | virtual bool IsReadyToRestartForAuth() OVERRIDE; |
[email protected] | 0757e770 | 2009-03-27 04:00:22 | [diff] [blame] | 187 | |
[email protected] | 9dea9e1f | 2009-01-29 00:30:47 | [diff] [blame] | 188 | virtual int Read(net::IOBuffer* buf, int buf_len, |
[email protected] | 49639fa | 2011-12-20 23:22:41 | [diff] [blame] | 189 | const net::CompletionCallback& callback) OVERRIDE; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 190 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 191 | virtual void StopCaching() OVERRIDE; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 192 | |
[email protected] | 79e1fd6 | 2013-06-20 06:50:04 | [diff] [blame] | 193 | virtual bool GetFullRequestHeaders( |
| 194 | net::HttpRequestHeaders* headers) const OVERRIDE; |
| 195 | |
[email protected] | b8015c4 | 2013-12-24 15:18:19 | [diff] [blame] | 196 | virtual int64 GetTotalReceivedBytes() const OVERRIDE; |
| 197 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 198 | virtual void DoneReading() OVERRIDE; |
[email protected] | 5c04f72 | 2011-08-12 17:52:47 | [diff] [blame] | 199 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 200 | virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
[email protected] | 9dd90e5 | 2010-02-23 19:15:01 | [diff] [blame] | 201 | |
[email protected] | f3cf980 | 2011-10-28 18:44:58 | [diff] [blame] | 202 | virtual net::LoadState GetLoadState() const OVERRIDE; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 203 | |
[email protected] | 196d18a | 2012-08-30 03:47:31 | [diff] [blame] | 204 | virtual net::UploadProgress GetUploadProgress() const OVERRIDE; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 205 | |
[email protected] | 8cd06c0 | 2014-01-25 07:50:14 | [diff] [blame^] | 206 | virtual void SetQuicServerInfo( |
| 207 | net::QuicServerInfo* quic_server_info) OVERRIDE; |
| 208 | |
[email protected] | 58e32bb | 2013-01-21 18:23:25 | [diff] [blame] | 209 | virtual bool GetLoadTimingInfo( |
| 210 | net::LoadTimingInfo* load_timing_info) const OVERRIDE; |
| 211 | |
[email protected] | 5033ab8 | 2013-03-22 20:17:46 | [diff] [blame] | 212 | virtual void SetPriority(net::RequestPriority priority) OVERRIDE; |
| 213 | |
[email protected] | 831e4a3 | 2013-11-14 02:14:44 | [diff] [blame] | 214 | virtual void SetWebSocketHandshakeStreamCreateHelper( |
| 215 | CreateHelper* create_helper) OVERRIDE; |
| 216 | |
[email protected] | 1826a40 | 2014-01-08 15:40:48 | [diff] [blame] | 217 | virtual void SetBeforeNetworkStartCallback( |
| 218 | const BeforeNetworkStartCallback& callback) OVERRIDE; |
| 219 | |
| 220 | virtual int ResumeNetworkStart() OVERRIDE; |
| 221 | |
[email protected] | 831e4a3 | 2013-11-14 02:14:44 | [diff] [blame] | 222 | CreateHelper* websocket_handshake_stream_create_helper() { |
| 223 | return websocket_handshake_stream_create_helper_; |
| 224 | } |
[email protected] | 5033ab8 | 2013-03-22 20:17:46 | [diff] [blame] | 225 | net::RequestPriority priority() const { return priority_; } |
| 226 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 227 | private: |
[email protected] | d7358ba | 2014-01-04 01:39:49 | [diff] [blame] | 228 | int StartInternal(const net::HttpRequestInfo* request, |
| 229 | const net::CompletionCallback& callback, |
| 230 | const net::BoundNetLog& net_log); |
[email protected] | 49639fa | 2011-12-20 23:22:41 | [diff] [blame] | 231 | void CallbackLater(const net::CompletionCallback& callback, int result); |
| 232 | void RunCallback(const net::CompletionCallback& callback, int result); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 233 | |
[email protected] | 49639fa | 2011-12-20 23:22:41 | [diff] [blame] | 234 | base::WeakPtrFactory<MockNetworkTransaction> weak_factory_; |
[email protected] | d7358ba | 2014-01-04 01:39:49 | [diff] [blame] | 235 | const net::HttpRequestInfo* request_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 236 | net::HttpResponseInfo response_; |
| 237 | std::string data_; |
| 238 | int data_cursor_; |
| 239 | int test_mode_; |
[email protected] | 5033ab8 | 2013-03-22 20:17:46 | [diff] [blame] | 240 | net::RequestPriority priority_; |
[email protected] | 831e4a3 | 2013-11-14 02:14:44 | [diff] [blame] | 241 | CreateHelper* websocket_handshake_stream_create_helper_; |
[email protected] | 5c04f72 | 2011-08-12 17:52:47 | [diff] [blame] | 242 | base::WeakPtr<MockNetworkLayer> transaction_factory_; |
[email protected] | b8015c4 | 2013-12-24 15:18:19 | [diff] [blame] | 243 | int64 received_bytes_; |
[email protected] | 3b23a22 | 2013-05-15 21:33:25 | [diff] [blame] | 244 | |
| 245 | // NetLog ID of the fake / non-existent underlying socket used by the |
| 246 | // connection. Requires Start() be passed a BoundNetLog with a real NetLog to |
| 247 | // be initialized. |
| 248 | unsigned int socket_log_id_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 249 | }; |
| 250 | |
[email protected] | 5c04f72 | 2011-08-12 17:52:47 | [diff] [blame] | 251 | class MockNetworkLayer : public net::HttpTransactionFactory, |
| 252 | public base::SupportsWeakPtr<MockNetworkLayer> { |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 253 | public: |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 254 | MockNetworkLayer(); |
| 255 | virtual ~MockNetworkLayer(); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 256 | |
| 257 | int transaction_count() const { return transaction_count_; } |
[email protected] | 5c04f72 | 2011-08-12 17:52:47 | [diff] [blame] | 258 | bool done_reading_called() const { return done_reading_called_; } |
| 259 | void TransactionDoneReading(); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 260 | |
[email protected] | 5033ab8 | 2013-03-22 20:17:46 | [diff] [blame] | 261 | // Returns the last priority passed to CreateTransaction, or |
| 262 | // DEFAULT_PRIORITY if it hasn't been called yet. |
| 263 | net::RequestPriority last_create_transaction_priority() const { |
| 264 | return last_create_transaction_priority_; |
| 265 | } |
| 266 | |
| 267 | // Returns the last transaction created by |
| 268 | // CreateTransaction. Returns a NULL WeakPtr if one has not been |
| 269 | // created yet, or the last transaction has been destroyed, or |
| 270 | // ClearLastTransaction() has been called and a new transaction |
| 271 | // hasn't been created yet. |
| 272 | base::WeakPtr<MockNetworkTransaction> last_transaction() { |
| 273 | return last_transaction_; |
| 274 | } |
| 275 | |
| 276 | // Makes last_transaction() return NULL until the next transaction |
| 277 | // is created. |
| 278 | void ClearLastTransaction() { |
| 279 | last_transaction_.reset(); |
| 280 | } |
| 281 | |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 282 | // net::HttpTransactionFactory: |
[email protected] | f2cbbc8 | 2011-11-16 01:10:29 | [diff] [blame] | 283 | virtual int CreateTransaction( |
[email protected] | 262eec8 | 2013-03-19 21:01:36 | [diff] [blame] | 284 | net::RequestPriority priority, |
[email protected] | 027bd85a | 2013-12-27 22:39:10 | [diff] [blame] | 285 | scoped_ptr<net::HttpTransaction>* trans) OVERRIDE; |
[email protected] | f2cbbc8 | 2011-11-16 01:10:29 | [diff] [blame] | 286 | virtual net::HttpCache* GetCache() OVERRIDE; |
| 287 | virtual net::HttpNetworkSession* GetSession() OVERRIDE; |
[email protected] | d2db029 | 2011-01-26 20:23:44 | [diff] [blame] | 288 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 289 | private: |
| 290 | int transaction_count_; |
[email protected] | 5c04f72 | 2011-08-12 17:52:47 | [diff] [blame] | 291 | bool done_reading_called_; |
[email protected] | 5033ab8 | 2013-03-22 20:17:46 | [diff] [blame] | 292 | net::RequestPriority last_create_transaction_priority_; |
| 293 | base::WeakPtr<MockNetworkTransaction> last_transaction_; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 294 | }; |
| 295 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 296 | //----------------------------------------------------------------------------- |
| 297 | // helpers |
| 298 | |
| 299 | // read the transaction completely |
| 300 | int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
| 301 | |
| 302 | #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |