Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: net/http/http_transaction_unittest.h

Issue 501099: Http cache: Add a test to make sure that the cache... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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>
(...skipping 16 matching lines...) Expand all
27 // mock transaction data 27 // mock transaction data
28 28
29 // these flags may be combined to form the test_mode field 29 // these flags may be combined to form the test_mode field
30 enum { 30 enum {
31 TEST_MODE_NORMAL = 0, 31 TEST_MODE_NORMAL = 0,
32 TEST_MODE_SYNC_NET_START = 1 << 0, 32 TEST_MODE_SYNC_NET_START = 1 << 0,
33 TEST_MODE_SYNC_NET_READ = 1 << 1, 33 TEST_MODE_SYNC_NET_READ = 1 << 1,
34 TEST_MODE_SYNC_CACHE_START = 1 << 2, 34 TEST_MODE_SYNC_CACHE_START = 1 << 2,
35 TEST_MODE_SYNC_CACHE_READ = 1 << 3, 35 TEST_MODE_SYNC_CACHE_READ = 1 << 3,
36 TEST_MODE_SYNC_CACHE_WRITE = 1 << 4, 36 TEST_MODE_SYNC_CACHE_WRITE = 1 << 4,
37 TEST_MODE_SYNC_ALL = TEST_MODE_SYNC_NET_START | TEST_MODE_SYNC_NET_READ |
38 TEST_MODE_SYNC_CACHE_START | TEST_MODE_SYNC_CACHE_READ |
39 TEST_MODE_SYNC_CACHE_WRITE
37 }; 40 };
38 41
39 typedef void (*MockTransactionHandler)(const net::HttpRequestInfo* request, 42 typedef void (*MockTransactionHandler)(const net::HttpRequestInfo* request,
40 std::string* response_status, 43 std::string* response_status,
41 std::string* response_headers, 44 std::string* response_headers,
42 std::string* response_data); 45 std::string* response_data);
43 46
44 struct MockTransaction { 47 struct MockTransaction {
45 const char* url; 48 const char* url;
46 const char* method; 49 const char* method;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 }; 339 };
337 340
338 341
339 //----------------------------------------------------------------------------- 342 //-----------------------------------------------------------------------------
340 // helpers 343 // helpers
341 344
342 // read the transaction completely 345 // read the transaction completely
343 int ReadTransaction(net::HttpTransaction* trans, std::string* result); 346 int ReadTransaction(net::HttpTransaction* trans, std::string* result);
344 347
345 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 348 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698