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/spdy/spdy_websocket_stream.h" | 5 #include "net/spdy/spdy_websocket_stream.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 session_deps_(GetParam()), | 194 session_deps_(GetParam()), |
195 stream_id_(0), | 195 stream_id_(0), |
196 created_stream_id_(0) {} | 196 created_stream_id_(0) {} |
197 virtual ~SpdyWebSocketStreamTest() {} | 197 virtual ~SpdyWebSocketStreamTest() {} |
198 | 198 |
199 virtual void SetUp() { | 199 virtual void SetUp() { |
200 host_port_pair_.set_host("example.com"); | 200 host_port_pair_.set_host("example.com"); |
201 host_port_pair_.set_port(80); | 201 host_port_pair_.set_port(80); |
202 spdy_session_key_ = SpdySessionKey(host_port_pair_, | 202 spdy_session_key_ = SpdySessionKey(host_port_pair_, |
203 ProxyServer::Direct(), | 203 ProxyServer::Direct(), |
204 PRIVACY_MODE_DISABLED); | 204 kPrivacyModeDisabled); |
205 | 205 |
206 spdy_settings_to_send_[spdy_settings_id_to_set_] = | 206 spdy_settings_to_send_[spdy_settings_id_to_set_] = |
207 SettingsFlagsAndValue( | 207 SettingsFlagsAndValue( |
208 SETTINGS_FLAG_PERSISTED, spdy_settings_value_to_set_); | 208 SETTINGS_FLAG_PERSISTED, spdy_settings_value_to_set_); |
209 } | 209 } |
210 | 210 |
211 virtual void TearDown() { | 211 virtual void TearDown() { |
212 base::MessageLoop::current()->RunUntilIdle(); | 212 base::MessageLoop::current()->RunUntilIdle(); |
213 } | 213 } |
214 | 214 |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 EXPECT_EQ(OK, events[7].result); | 661 EXPECT_EQ(OK, events[7].result); |
662 | 662 |
663 // EOF close SPDY session. | 663 // EOF close SPDY session. |
664 EXPECT_FALSE( | 664 EXPECT_FALSE( |
665 HasSpdySession(http_session_->spdy_session_pool(), spdy_session_key_)); | 665 HasSpdySession(http_session_->spdy_session_pool(), spdy_session_key_)); |
666 EXPECT_TRUE(data.at_read_eof()); | 666 EXPECT_TRUE(data.at_read_eof()); |
667 EXPECT_TRUE(data.at_write_eof()); | 667 EXPECT_TRUE(data.at_write_eof()); |
668 } | 668 } |
669 | 669 |
670 } // namespace net | 670 } // namespace net |
OLD | NEW |