OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
19 #include "net/base/load_flags.h" | 19 #include "net/base/load_flags.h" |
20 #include "net/base/net_error_details.h" | 20 #include "net/base/net_error_details.h" |
21 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
22 #include "net/base/request_priority.h" | 22 #include "net/base/request_priority.h" |
23 #include "net/base/test_completion_callback.h" | 23 #include "net/base/test_completion_callback.h" |
24 #include "net/disk_cache/disk_cache.h" | 24 #include "net/disk_cache/disk_cache.h" |
25 #include "net/http/http_cache.h" | 25 #include "net/http/http_cache.h" |
26 #include "net/http/http_request_info.h" | 26 #include "net/http/http_request_info.h" |
27 #include "net/http/http_response_headers.h" | 27 #include "net/http/http_response_headers.h" |
28 #include "net/http/http_response_info.h" | 28 #include "net/http/http_response_info.h" |
29 #include "net/log/net_log.h" | |
30 #include "net/socket/connection_attempts.h" | 29 #include "net/socket/connection_attempts.h" |
31 | 30 |
32 namespace net { | 31 namespace net { |
33 | 32 |
34 class HttpRequestHeaders; | 33 class HttpRequestHeaders; |
35 class IOBuffer; | 34 class IOBuffer; |
36 class SSLPrivateKey; | 35 class SSLPrivateKey; |
37 class X509Certificate; | 36 class X509Certificate; |
| 37 class NetLogWithSource; |
38 struct HttpRequestInfo; | 38 struct HttpRequestInfo; |
39 | 39 |
40 //----------------------------------------------------------------------------- | 40 //----------------------------------------------------------------------------- |
41 // mock transaction data | 41 // mock transaction data |
42 | 42 |
43 // these flags may be combined to form the test_mode field | 43 // these flags may be combined to form the test_mode field |
44 enum { | 44 enum { |
45 TEST_MODE_NORMAL = 0, | 45 TEST_MODE_NORMAL = 0, |
46 TEST_MODE_SYNC_NET_START = 1 << 0, | 46 TEST_MODE_SYNC_NET_START = 1 << 0, |
47 TEST_MODE_SYNC_NET_READ = 1 << 1, | 47 TEST_MODE_SYNC_NET_READ = 1 << 1, |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 //----------------------------------------------------------------------------- | 350 //----------------------------------------------------------------------------- |
351 // helpers | 351 // helpers |
352 | 352 |
353 // read the transaction completely | 353 // read the transaction completely |
354 int ReadTransaction(HttpTransaction* trans, std::string* result); | 354 int ReadTransaction(HttpTransaction* trans, std::string* result); |
355 | 355 |
356 } // namespace net | 356 } // namespace net |
357 | 357 |
358 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 358 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
OLD | NEW |