OLD | NEW |
1 // Copyright (c) 2012 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> |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 const net::CompletionCallback& callback) OVERRIDE; | 177 const net::CompletionCallback& callback) OVERRIDE; |
178 | 178 |
179 virtual void StopCaching() OVERRIDE; | 179 virtual void StopCaching() OVERRIDE; |
180 | 180 |
181 virtual void DoneReading() OVERRIDE; | 181 virtual void DoneReading() OVERRIDE; |
182 | 182 |
183 virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 183 virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
184 | 184 |
185 virtual net::LoadState GetLoadState() const OVERRIDE; | 185 virtual net::LoadState GetLoadState() const OVERRIDE; |
186 | 186 |
187 virtual uint64 GetUploadProgress() const OVERRIDE; | 187 virtual net::UploadProgress GetUploadProgress() const OVERRIDE; |
188 | 188 |
189 private: | 189 private: |
190 void CallbackLater(const net::CompletionCallback& callback, int result); | 190 void CallbackLater(const net::CompletionCallback& callback, int result); |
191 void RunCallback(const net::CompletionCallback& callback, int result); | 191 void RunCallback(const net::CompletionCallback& callback, int result); |
192 | 192 |
193 base::WeakPtrFactory<MockNetworkTransaction> weak_factory_; | 193 base::WeakPtrFactory<MockNetworkTransaction> weak_factory_; |
194 net::HttpResponseInfo response_; | 194 net::HttpResponseInfo response_; |
195 std::string data_; | 195 std::string data_; |
196 int data_cursor_; | 196 int data_cursor_; |
197 int test_mode_; | 197 int test_mode_; |
(...skipping 22 matching lines...) Expand all Loading... |
220 bool done_reading_called_; | 220 bool done_reading_called_; |
221 }; | 221 }; |
222 | 222 |
223 //----------------------------------------------------------------------------- | 223 //----------------------------------------------------------------------------- |
224 // helpers | 224 // helpers |
225 | 225 |
226 // read the transaction completely | 226 // read the transaction completely |
227 int ReadTransaction(net::HttpTransaction* trans, std::string* result); | 227 int ReadTransaction(net::HttpTransaction* trans, std::string* result); |
228 | 228 |
229 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ | 229 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ |
OLD | NEW |