| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 | 221 |
| 222 TestDelegate delegate_; | 222 TestDelegate delegate_; |
| 223 scoped_ptr<URLRequest> req_; | 223 scoped_ptr<URLRequest> req_; |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper { | 226 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper { |
| 227 public: | 227 public: |
| 228 // GoogleMock does not appear to play nicely with move-only types like | 228 // GoogleMock does not appear to play nicely with move-only types like |
| 229 // scoped_ptr, so this forwarding method acts as a workaround. | 229 // scoped_ptr, so this forwarding method acts as a workaround. |
| 230 virtual WebSocketHandshakeStreamBase* CreateBasicStream( | 230 WebSocketHandshakeStreamBase* CreateBasicStream( |
| 231 scoped_ptr<ClientSocketHandle> connection, | 231 scoped_ptr<ClientSocketHandle> connection, |
| 232 bool using_proxy) override { | 232 bool using_proxy) override { |
| 233 // Discard the arguments since we don't need them anyway. | 233 // Discard the arguments since we don't need them anyway. |
| 234 return CreateBasicStreamMock(); | 234 return CreateBasicStreamMock(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 MOCK_METHOD0(CreateBasicStreamMock, | 237 MOCK_METHOD0(CreateBasicStreamMock, |
| 238 WebSocketHandshakeStreamBase*()); | 238 WebSocketHandshakeStreamBase*()); |
| 239 | 239 |
| 240 MOCK_METHOD2(CreateSpdyStream, | 240 MOCK_METHOD2(CreateSpdyStream, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 req_->SetLoadFlags(LOAD_DISABLE_CACHE); | 342 req_->SetLoadFlags(LOAD_DISABLE_CACHE); |
| 343 job->Start(); | 343 job->Start(); |
| 344 base::RunLoop().RunUntilIdle(); | 344 base::RunLoop().RunUntilIdle(); |
| 345 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); | 345 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); |
| 346 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); | 346 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace | 349 } // namespace |
| 350 | 350 |
| 351 } // namespace net | 351 } // namespace net |
| OLD | NEW |