| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/websockets/websocket_handshake_stream_create_helper.h" | 5 #include "net/websockets/websocket_handshake_stream_create_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 ClientSocketPoolHistograms histograms_; | 54 ClientSocketPoolHistograms histograms_; |
| 55 MockTransportClientSocketPool pool_; | 55 MockTransportClientSocketPool pool_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(MockClientSocketHandleFactory); | 57 DISALLOW_COPY_AND_ASSIGN(MockClientSocketHandleFactory); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class TestConnectDelegate : public WebSocketStream::ConnectDelegate { | 60 class TestConnectDelegate : public WebSocketStream::ConnectDelegate { |
| 61 public: | 61 public: |
| 62 virtual ~TestConnectDelegate() {} | 62 virtual ~TestConnectDelegate() {} |
| 63 | 63 |
| 64 virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) OVERRIDE {} | 64 virtual void OnSuccess(scoped_ptr<WebSocketStream> stream) override {} |
| 65 virtual void OnFailure(const std::string& failure_message) OVERRIDE {} | 65 virtual void OnFailure(const std::string& failure_message) override {} |
| 66 virtual void OnStartOpeningHandshake( | 66 virtual void OnStartOpeningHandshake( |
| 67 scoped_ptr<WebSocketHandshakeRequestInfo> request) OVERRIDE {} | 67 scoped_ptr<WebSocketHandshakeRequestInfo> request) override {} |
| 68 virtual void OnFinishOpeningHandshake( | 68 virtual void OnFinishOpeningHandshake( |
| 69 scoped_ptr<WebSocketHandshakeResponseInfo> response) OVERRIDE {} | 69 scoped_ptr<WebSocketHandshakeResponseInfo> response) override {} |
| 70 virtual void OnSSLCertificateError( | 70 virtual void OnSSLCertificateError( |
| 71 scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks> | 71 scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks> |
| 72 ssl_error_callbacks, | 72 ssl_error_callbacks, |
| 73 const SSLInfo& ssl_info, | 73 const SSLInfo& ssl_info, |
| 74 bool fatal) OVERRIDE {} | 74 bool fatal) override {} |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 class WebSocketHandshakeStreamCreateHelperTest : public ::testing::Test { | 77 class WebSocketHandshakeStreamCreateHelperTest : public ::testing::Test { |
| 78 protected: | 78 protected: |
| 79 scoped_ptr<WebSocketStream> CreateAndInitializeStream( | 79 scoped_ptr<WebSocketStream> CreateAndInitializeStream( |
| 80 const std::string& socket_url, | 80 const std::string& socket_url, |
| 81 const std::string& socket_path, | 81 const std::string& socket_path, |
| 82 const std::vector<std::string>& sub_protocols, | 82 const std::vector<std::string>& sub_protocols, |
| 83 const std::string& origin, | 83 const std::string& origin, |
| 84 const std::string& extra_request_headers, | 84 const std::string& extra_request_headers, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 EXPECT_EQ( | 196 EXPECT_EQ( |
| 197 "permessage-deflate;" | 197 "permessage-deflate;" |
| 198 " client_max_window_bits=14; server_max_window_bits=14;" | 198 " client_max_window_bits=14; server_max_window_bits=14;" |
| 199 " server_no_context_takeover; client_no_context_takeover", | 199 " server_no_context_takeover; client_no_context_takeover", |
| 200 stream->GetExtensions()); | 200 stream->GetExtensions()); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace | 203 } // namespace |
| 204 } // namespace net | 204 } // namespace net |
| OLD | NEW |