Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Side by Side Diff: net/websockets/websocket_handshake_stream_create_helper_test.cc

Issue 304093003: Support recovery from SSL errors for new WebSocket implementation (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-for-pool-throttling
Patch Set: clang compile fix. Also lint & format cleanups. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(
71 scoped_ptr<WebSocketEventInterface::SSLErrorCallbacks>
72 ssl_error_callbacks,
73 const SSLInfo& ssl_info,
74 bool fatal) OVERRIDE {}
70 }; 75 };
71 76
72 class WebSocketHandshakeStreamCreateHelperTest : public ::testing::Test { 77 class WebSocketHandshakeStreamCreateHelperTest : public ::testing::Test {
73 protected: 78 protected:
74 scoped_ptr<WebSocketStream> CreateAndInitializeStream( 79 scoped_ptr<WebSocketStream> CreateAndInitializeStream(
75 const std::string& socket_url, 80 const std::string& socket_url,
76 const std::string& socket_path, 81 const std::string& socket_path,
77 const std::vector<std::string>& sub_protocols, 82 const std::vector<std::string>& sub_protocols,
78 const std::string& origin, 83 const std::string& origin,
79 const std::string& extra_request_headers, 84 const std::string& extra_request_headers,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 193
189 EXPECT_EQ( 194 EXPECT_EQ(
190 "permessage-deflate;" 195 "permessage-deflate;"
191 " client_max_window_bits=14; server_max_window_bits=14;" 196 " client_max_window_bits=14; server_max_window_bits=14;"
192 " server_no_context_takeover; client_no_context_takeover", 197 " server_no_context_takeover; client_no_context_takeover",
193 stream->GetExtensions()); 198 stream->GetExtensions());
194 } 199 }
195 200
196 } // namespace 201 } // namespace
197 } // namespace net 202 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698