OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <algorithm> | 10 #include <algorithm> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
16 #include "net/base/io_buffer.h" | 16 #include "net/base/io_buffer.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "net/base/load_flags.h" | 18 #include "net/base/load_flags.h" |
19 #include "net/base/test_completion_callback.h" | 19 #include "net/base/test_completion_callback.h" |
20 #include "net/disk_cache/disk_cache.h" | 20 #include "net/disk_cache/disk_cache.h" |
21 #include "net/http/http_cache.h" | 21 #include "net/http/http_cache.h" |
22 #include "net/http/http_request_info.h" | 22 #include "net/http/http_request_info.h" |
| 23 #include "net/http/http_response_headers.h" |
23 #include "net/http/http_response_info.h" | 24 #include "net/http/http_response_info.h" |
24 | 25 |
25 //----------------------------------------------------------------------------- | 26 //----------------------------------------------------------------------------- |
26 // mock transaction data | 27 // mock transaction data |
27 | 28 |
28 // these flags may be combined to form the test_mode field | 29 // these flags may be combined to form the test_mode field |
29 enum { | 30 enum { |
30 TEST_MODE_NORMAL = 0, | 31 TEST_MODE_NORMAL = 0, |
31 TEST_MODE_SYNC_NET_START = 1 << 0, | 32 TEST_MODE_SYNC_NET_START = 1 << 0, |
32 TEST_MODE_SYNC_NET_READ = 1 << 1, | 33 TEST_MODE_SYNC_NET_READ = 1 << 1, |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 }; | 307 }; |
307 | 308 |
308 | 309 |
309 //----------------------------------------------------------------------------- | 310 //----------------------------------------------------------------------------- |
310 // helpers | 311 // helpers |
311 | 312 |
312 // read the transaction completely | 313 // read the transaction completely |
313 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 314 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
314 | 315 |
315 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 316 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
OLD | NEW |