OLD | NEW |
1 // Copyright (c) 2011 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 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 public: | 203 public: |
204 MockNetworkLayer(); | 204 MockNetworkLayer(); |
205 virtual ~MockNetworkLayer(); | 205 virtual ~MockNetworkLayer(); |
206 | 206 |
207 int transaction_count() const { return transaction_count_; } | 207 int transaction_count() const { return transaction_count_; } |
208 bool done_reading_called() const { return done_reading_called_; } | 208 bool done_reading_called() const { return done_reading_called_; } |
209 void TransactionDoneReading(); | 209 void TransactionDoneReading(); |
210 | 210 |
211 // net::HttpTransactionFactory: | 211 // net::HttpTransactionFactory: |
212 virtual int CreateTransaction( | 212 virtual int CreateTransaction( |
213 scoped_ptr<net::HttpTransaction>* trans) OVERRIDE; | 213 scoped_ptr<net::HttpTransaction>* trans, |
| 214 net::HttpTransactionDelegate* delegate) OVERRIDE; |
214 virtual net::HttpCache* GetCache() OVERRIDE; | 215 virtual net::HttpCache* GetCache() OVERRIDE; |
215 virtual net::HttpNetworkSession* GetSession() OVERRIDE; | 216 virtual net::HttpNetworkSession* GetSession() OVERRIDE; |
216 | 217 |
217 private: | 218 private: |
218 int transaction_count_; | 219 int transaction_count_; |
219 bool done_reading_called_; | 220 bool done_reading_called_; |
220 }; | 221 }; |
221 | 222 |
222 //----------------------------------------------------------------------------- | 223 //----------------------------------------------------------------------------- |
223 // helpers | 224 // helpers |
224 | 225 |
225 // read the transaction completely | 226 // read the transaction completely |
226 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 227 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
227 | 228 |
228 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 229 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
OLD | NEW |