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