| 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 public: | 843 public: |
| 844 FakeWebSocketHandshakeStream() : initialize_stream_was_called_(false) {} | 844 FakeWebSocketHandshakeStream() : initialize_stream_was_called_(false) {} |
| 845 | 845 |
| 846 bool initialize_stream_was_called() const { | 846 bool initialize_stream_was_called() const { |
| 847 return initialize_stream_was_called_; | 847 return initialize_stream_was_called_; |
| 848 } | 848 } |
| 849 | 849 |
| 850 // Fake implementation of HttpStreamBase methods. | 850 // Fake implementation of HttpStreamBase methods. |
| 851 int InitializeStream(const HttpRequestInfo* request_info, | 851 int InitializeStream(const HttpRequestInfo* request_info, |
| 852 RequestPriority priority, | 852 RequestPriority priority, |
| 853 const BoundNetLog& net_log, | 853 const NetLogWithSource& net_log, |
| 854 const CompletionCallback& callback) override { | 854 const CompletionCallback& callback) override { |
| 855 initialize_stream_was_called_ = true; | 855 initialize_stream_was_called_ = true; |
| 856 return ERR_IO_PENDING; | 856 return ERR_IO_PENDING; |
| 857 } | 857 } |
| 858 | 858 |
| 859 int SendRequest(const HttpRequestHeaders& request_headers, | 859 int SendRequest(const HttpRequestHeaders& request_headers, |
| 860 HttpResponseInfo* response, | 860 HttpResponseInfo* response, |
| 861 const CompletionCallback& callback) override { | 861 const CompletionCallback& callback) override { |
| 862 return ERR_IO_PENDING; | 862 return ERR_IO_PENDING; |
| 863 } | 863 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 base::RunLoop().RunUntilIdle(); | 939 base::RunLoop().RunUntilIdle(); |
| 940 EXPECT_THAT(delegate_.request_status(), IsError(ERR_IO_PENDING)); | 940 EXPECT_THAT(delegate_.request_status(), IsError(ERR_IO_PENDING)); |
| 941 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); | 941 EXPECT_TRUE(fake_handshake_stream->initialize_stream_was_called()); |
| 942 } | 942 } |
| 943 | 943 |
| 944 #endif // defined(ENABLE_WEBSOCKETS) | 944 #endif // defined(ENABLE_WEBSOCKETS) |
| 945 | 945 |
| 946 } // namespace | 946 } // namespace |
| 947 | 947 |
| 948 } // namespace net | 948 } // namespace net |
| OLD | NEW |