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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 base::RunLoop().RunUntilIdle(); | 940 base::RunLoop().RunUntilIdle(); |
941 EXPECT_THAT(delegate_.request_status(), IsError(ERR_IO_PENDING)); | 941 EXPECT_THAT(delegate_.request_status(), IsError(ERR_IO_PENDING)); |
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(ENABLE_WEBSOCKETS) | 945 #endif // defined(ENABLE_WEBSOCKETS) |
946 | 946 |
947 } // namespace | 947 } // namespace |
948 | 948 |
949 } // namespace net | 949 } // namespace net |
OLD | NEW |