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> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "net/base/io_buffer.h" | 16 #include "net/base/io_buffer.h" |
| 17 #include "net/base/load_flags.h" | 17 #include "net/base/load_flags.h" |
| 18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
| 19 #include "net/base/net_log.h" | 19 #include "net/base/net_log.h" |
| 20 #include "net/base/request_priority.h" | 20 #include "net/base/request_priority.h" |
| 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 #include "net/quic/crypto/quic_server_info.h" | |
|
wtc
2014/01/23 23:25:24
A forward declaration of QuicServerInfo should suf
ramant (doing other things)
2014/01/23 23:57:13
Done.
| |
| 27 | 28 |
| 28 namespace net { | 29 namespace net { |
| 29 class HttpRequestHeaders; | 30 class HttpRequestHeaders; |
| 30 class IOBuffer; | 31 class IOBuffer; |
| 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 |
| (...skipping 159 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 |