| 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 SpdyProxyClientSocketSpdy3Test : public PlatformTest { | 61 class SpdyProxyClientSocketSpdy3Test : public PlatformTest { |
| 62 public: | 62 public: |
| 63 SpdyProxyClientSocketSpdy3Test(); | 63 SpdyProxyClientSocketSpdy3Test(); |
| 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::kProtoSPDY3); |
| 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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 write_callback_.callback())); | 1308 write_callback_.callback())); |
| 1305 | 1309 |
| 1306 Run(2); | 1310 Run(2); |
| 1307 | 1311 |
| 1308 EXPECT_FALSE(sock_.get()); | 1312 EXPECT_FALSE(sock_.get()); |
| 1309 EXPECT_TRUE(read_callback.have_result()); | 1313 EXPECT_TRUE(read_callback.have_result()); |
| 1310 EXPECT_FALSE(write_callback_.have_result()); | 1314 EXPECT_FALSE(write_callback_.have_result()); |
| 1311 } | 1315 } |
| 1312 | 1316 |
| 1313 } // namespace net | 1317 } // namespace net |
| OLD | NEW |