| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 public: | 197 public: |
| 198 MockNetworkLayer(); | 198 MockNetworkLayer(); |
| 199 virtual ~MockNetworkLayer(); | 199 virtual ~MockNetworkLayer(); |
| 200 | 200 |
| 201 int transaction_count() const { return transaction_count_; } | 201 int transaction_count() const { return transaction_count_; } |
| 202 | 202 |
| 203 // net::HttpTransactionFactory: | 203 // net::HttpTransactionFactory: |
| 204 virtual int CreateTransaction(scoped_ptr<net::HttpTransaction>* trans); | 204 virtual int CreateTransaction(scoped_ptr<net::HttpTransaction>* trans); |
| 205 virtual net::HttpCache* GetCache(); | 205 virtual net::HttpCache* GetCache(); |
| 206 virtual net::HttpNetworkSession* GetSession(); | 206 virtual net::HttpNetworkSession* GetSession(); |
| 207 virtual void Suspend(bool suspend); | |
| 208 | 207 |
| 209 private: | 208 private: |
| 210 int transaction_count_; | 209 int transaction_count_; |
| 211 }; | 210 }; |
| 212 | 211 |
| 213 //----------------------------------------------------------------------------- | 212 //----------------------------------------------------------------------------- |
| 214 // helpers | 213 // helpers |
| 215 | 214 |
| 216 // read the transaction completely | 215 // read the transaction completely |
| 217 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 216 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
| 218 | 217 |
| 219 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 218 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
| OLD | NEW |