Chromium Code Reviews| 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 10 matching lines...) Expand all Loading... | |
| 21 #include "net/base/test_completion_callback.h" | 21 #include "net/base/test_completion_callback.h" |
| 22 #include "net/disk_cache/disk_cache.h" | 22 #include "net/disk_cache/disk_cache.h" |
| 23 #include "net/http/http_cache.h" | 23 #include "net/http/http_cache.h" |
| 24 #include "net/http/http_request_info.h" | 24 #include "net/http/http_request_info.h" |
| 25 #include "net/http/http_response_headers.h" | 25 #include "net/http/http_response_headers.h" |
| 26 #include "net/http/http_response_info.h" | 26 #include "net/http/http_response_info.h" |
| 27 | 27 |
| 28 namespace net { | 28 namespace net { |
| 29 class HttpRequestHeaders; | 29 class HttpRequestHeaders; |
| 30 class IOBuffer; | 30 class IOBuffer; |
| 31 class QuicServerInfo; | |
|
wtc
2014/01/24 02:30:00
We may not even need the forward declaration. It's
ramant (doing other things)
2014/01/24 22:19:14
Done.
| |
| 31 } | 32 } |
| 32 | 33 |
| 33 //----------------------------------------------------------------------------- | 34 //----------------------------------------------------------------------------- |
| 34 // mock transaction data | 35 // mock transaction data |
| 35 | 36 |
| 36 // these flags may be combined to form the test_mode field | 37 // these flags may be combined to form the test_mode field |
| 37 enum { | 38 enum { |
| 38 TEST_MODE_NORMAL = 0, | 39 TEST_MODE_NORMAL = 0, |
| 39 TEST_MODE_SYNC_NET_START = 1 << 0, | 40 TEST_MODE_SYNC_NET_START = 1 << 0, |
| 40 TEST_MODE_SYNC_NET_READ = 1 << 1, | 41 TEST_MODE_SYNC_NET_READ = 1 << 1, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 virtual int64 GetTotalReceivedBytes() const OVERRIDE; | 197 virtual int64 GetTotalReceivedBytes() const OVERRIDE; |
| 197 | 198 |
| 198 virtual void DoneReading() OVERRIDE; | 199 virtual void DoneReading() OVERRIDE; |
| 199 | 200 |
| 200 virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 201 virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
| 201 | 202 |
| 202 virtual net::LoadState GetLoadState() const OVERRIDE; | 203 virtual net::LoadState GetLoadState() const OVERRIDE; |
| 203 | 204 |
| 204 virtual net::UploadProgress GetUploadProgress() const OVERRIDE; | 205 virtual net::UploadProgress GetUploadProgress() const OVERRIDE; |
| 205 | 206 |
| 207 virtual void SetQuicServerInfo( | |
| 208 net::QuicServerInfo* quic_server_info) OVERRIDE {} | |
| 209 | |
| 206 virtual bool GetLoadTimingInfo( | 210 virtual bool GetLoadTimingInfo( |
| 207 net::LoadTimingInfo* load_timing_info) const OVERRIDE; | 211 net::LoadTimingInfo* load_timing_info) const OVERRIDE; |
| 208 | 212 |
| 209 virtual void SetPriority(net::RequestPriority priority) OVERRIDE; | 213 virtual void SetPriority(net::RequestPriority priority) OVERRIDE; |
| 210 | 214 |
| 211 virtual void SetWebSocketHandshakeStreamCreateHelper( | 215 virtual void SetWebSocketHandshakeStreamCreateHelper( |
| 212 CreateHelper* create_helper) OVERRIDE; | 216 CreateHelper* create_helper) OVERRIDE; |
| 213 | 217 |
| 214 virtual void SetBeforeNetworkStartCallback( | 218 virtual void SetBeforeNetworkStartCallback( |
| 215 const BeforeNetworkStartCallback& callback) OVERRIDE; | 219 const BeforeNetworkStartCallback& callback) OVERRIDE; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 base::WeakPtr<MockNetworkTransaction> last_transaction_; | 294 base::WeakPtr<MockNetworkTransaction> last_transaction_; |
| 291 }; | 295 }; |
| 292 | 296 |
| 293 //----------------------------------------------------------------------------- | 297 //----------------------------------------------------------------------------- |
| 294 // helpers | 298 // helpers |
| 295 | 299 |
| 296 // read the transaction completely | 300 // read the transaction completely |
| 297 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 301 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
| 298 | 302 |
| 299 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 303 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| OLD | NEW |