OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 namespace net { | 59 namespace net { |
60 | 60 |
61 class SpdyProxyClientSocketSpdy2Test : public PlatformTest { | 61 class SpdyProxyClientSocketSpdy2Test : public PlatformTest { |
62 public: | 62 public: |
63 SpdyProxyClientSocketSpdy2Test(); | 63 SpdyProxyClientSocketSpdy2Test(); |
64 | 64 |
65 virtual void TearDown(); | 65 virtual void TearDown(); |
66 | 66 |
67 protected: | 67 protected: |
| 68 virtual void SetUp() { |
| 69 SpdySession::set_default_protocol(SSLClientSocket::kProtoSPDY2); |
| 70 } |
| 71 |
68 void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes, | 72 void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes, |
69 size_t writes_count); | 73 size_t writes_count); |
70 spdy::SpdyFrame* ConstructConnectRequestFrame(); | 74 spdy::SpdyFrame* ConstructConnectRequestFrame(); |
71 spdy::SpdyFrame* ConstructConnectAuthRequestFrame(); | 75 spdy::SpdyFrame* ConstructConnectAuthRequestFrame(); |
72 spdy::SpdyFrame* ConstructConnectReplyFrame(); | 76 spdy::SpdyFrame* ConstructConnectReplyFrame(); |
73 spdy::SpdyFrame* ConstructConnectAuthReplyFrame(); | 77 spdy::SpdyFrame* ConstructConnectAuthReplyFrame(); |
74 spdy::SpdyFrame* ConstructConnectErrorReplyFrame(); | 78 spdy::SpdyFrame* ConstructConnectErrorReplyFrame(); |
75 spdy::SpdyFrame* ConstructBodyFrame(const char* data, int length); | 79 spdy::SpdyFrame* ConstructBodyFrame(const char* data, int length); |
76 scoped_refptr<IOBufferWithSize> CreateBuffer(const char* data, int size); | 80 scoped_refptr<IOBufferWithSize> CreateBuffer(const char* data, int size); |
77 void AssertConnectSucceeds(); | 81 void AssertConnectSucceeds(); |
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 write_callback_.callback())); | 1307 write_callback_.callback())); |
1304 | 1308 |
1305 Run(2); | 1309 Run(2); |
1306 | 1310 |
1307 EXPECT_FALSE(sock_.get()); | 1311 EXPECT_FALSE(sock_.get()); |
1308 EXPECT_TRUE(read_callback.have_result()); | 1312 EXPECT_TRUE(read_callback.have_result()); |
1309 EXPECT_FALSE(write_callback_.have_result()); | 1313 EXPECT_FALSE(write_callback_.have_result()); |
1310 } | 1314 } |
1311 | 1315 |
1312 } // namespace net | 1316 } // namespace net |
OLD | NEW |