| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "net/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 virtual bool CanFindEndOfResponse() const OVERRIDE { return false; } | 226 virtual bool CanFindEndOfResponse() const OVERRIDE { return false; } |
| 227 | 227 |
| 228 virtual bool IsConnectionReused() const OVERRIDE { return false; } | 228 virtual bool IsConnectionReused() const OVERRIDE { return false; } |
| 229 virtual void SetConnectionReused() OVERRIDE {} | 229 virtual void SetConnectionReused() OVERRIDE {} |
| 230 | 230 |
| 231 virtual bool IsConnectionReusable() const OVERRIDE { return false; } | 231 virtual bool IsConnectionReusable() const OVERRIDE { return false; } |
| 232 | 232 |
| 233 virtual int64 GetTotalReceivedBytes() const OVERRIDE { return 0; } | 233 virtual int64 GetTotalReceivedBytes() const OVERRIDE { return 0; } |
| 234 | 234 |
| 235 virtual int64 GetReceivedBodyLength() const OVERRIDE { return 0; } |
| 236 |
| 235 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const | 237 virtual bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const |
| 236 OVERRIDE { | 238 OVERRIDE { |
| 237 return false; | 239 return false; |
| 238 } | 240 } |
| 239 | 241 |
| 240 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE {} | 242 virtual void GetSSLInfo(SSLInfo* ssl_info) OVERRIDE {} |
| 241 | 243 |
| 242 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) | 244 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) |
| 243 OVERRIDE {} | 245 OVERRIDE {} |
| 244 | 246 |
| 245 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; } | 247 virtual bool IsSpdyHttpStream() const OVERRIDE { return false; } |
| 246 | 248 |
| 247 virtual void Drain(HttpNetworkSession* session) OVERRIDE {} | 249 virtual void Drain(HttpNetworkSession* session) OVERRIDE {} |
| 248 | 250 |
| 249 virtual void SetPriority(RequestPriority priority) OVERRIDE {} | 251 virtual void SetPriority(RequestPriority priority) OVERRIDE {} |
| 250 | 252 |
| 253 virtual void SetRestartInfo(int64 read_offset, const void* hash, |
| 254 size_t hash_length) OVERRIDE {} |
| 255 |
| 256 virtual void GetHash(void* output, size_t len) OVERRIDE {} |
| 257 |
| 251 // Fake implementation of WebSocketHandshakeStreamBase method(s) | 258 // Fake implementation of WebSocketHandshakeStreamBase method(s) |
| 252 virtual scoped_ptr<WebSocketStream> Upgrade() OVERRIDE { | 259 virtual scoped_ptr<WebSocketStream> Upgrade() OVERRIDE { |
| 253 return scoped_ptr<WebSocketStream>(); | 260 return scoped_ptr<WebSocketStream>(); |
| 254 } | 261 } |
| 255 | 262 |
| 256 private: | 263 private: |
| 257 bool initialize_stream_was_called_; | 264 bool initialize_stream_was_called_; |
| 258 }; | 265 }; |
| 259 | 266 |
| 260 TEST_F(URLRequestHttpJobWebSocketTest, RejectedWithoutCreateHelper) { | 267 TEST_F(URLRequestHttpJobWebSocketTest, RejectedWithoutCreateHelper) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 280 req_.SetLoadFlags(LOAD_DISABLE_CACHE); | 287 req_.SetLoadFlags(LOAD_DISABLE_CACHE); |
| 281 job->Start(); | 288 job->Start(); |
| 282 base::RunLoop().RunUntilIdle(); | 289 base::RunLoop().RunUntilIdle(); |
| 283 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_.status().status()); | 290 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_.status().status()); |
| 284 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); | 291 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); |
| 285 } | 292 } |
| 286 | 293 |
| 287 } // namespace | 294 } // namespace |
| 288 | 295 |
| 289 } // namespace net | 296 } // namespace net |
| OLD | NEW |