| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 &delegate_)) { | 806 &delegate_)) { |
| 807 } | 807 } |
| 808 | 808 |
| 809 TestDelegate delegate_; | 809 TestDelegate delegate_; |
| 810 std::unique_ptr<URLRequest> req_; | 810 std::unique_ptr<URLRequest> req_; |
| 811 }; | 811 }; |
| 812 | 812 |
| 813 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper { | 813 class MockCreateHelper : public WebSocketHandshakeStreamBase::CreateHelper { |
| 814 public: | 814 public: |
| 815 // GoogleMock does not appear to play nicely with move-only types like | 815 // GoogleMock does not appear to play nicely with move-only types like |
| 816 // scoped_ptr, so this forwarding method acts as a workaround. | 816 // std::unique_ptr, so this forwarding method acts as a workaround. |
| 817 WebSocketHandshakeStreamBase* CreateBasicStream( | 817 WebSocketHandshakeStreamBase* CreateBasicStream( |
| 818 std::unique_ptr<ClientSocketHandle> connection, | 818 std::unique_ptr<ClientSocketHandle> connection, |
| 819 bool using_proxy) override { | 819 bool using_proxy) override { |
| 820 // Discard the arguments since we don't need them anyway. | 820 // Discard the arguments since we don't need them anyway. |
| 821 return CreateBasicStreamMock(); | 821 return CreateBasicStreamMock(); |
| 822 } | 822 } |
| 823 | 823 |
| 824 MOCK_METHOD0(CreateBasicStreamMock, | 824 MOCK_METHOD0(CreateBasicStreamMock, |
| 825 WebSocketHandshakeStreamBase*()); | 825 WebSocketHandshakeStreamBase*()); |
| 826 | 826 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 base::RunLoop().RunUntilIdle(); | 940 base::RunLoop().RunUntilIdle(); |
| 941 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); | 941 EXPECT_EQ(URLRequestStatus::IO_PENDING, req_->status().status()); |
| 942 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); | 942 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); |
| 943 } | 943 } |
| 944 | 944 |
| 945 #endif // !defined(OS_IOS) | 945 #endif // !defined(OS_IOS) |
| 946 | 946 |
| 947 } // namespace | 947 } // namespace |
| 948 | 948 |
| 949 } // namespace net | 949 } // namespace net |
| OLD | NEW |