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/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "net/base/address_list.h" | 10 #include "net/base/address_list.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 } // anonymous namespace | 59 } // anonymous namespace |
60 | 60 |
61 namespace net { | 61 namespace net { |
62 | 62 |
63 class SpdyProxyClientSocketTest | 63 class SpdyProxyClientSocketTest |
64 : public PlatformTest, | 64 : public PlatformTest, |
65 public testing::WithParamInterface<NextProto> { | 65 public testing::WithParamInterface<NextProto> { |
66 public: | 66 public: |
67 SpdyProxyClientSocketTest(); | 67 SpdyProxyClientSocketTest(); |
68 | 68 |
69 virtual void TearDown(); | 69 void TearDown() override; |
70 | 70 |
71 protected: | 71 protected: |
72 void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes, | 72 void Initialize(MockRead* reads, size_t reads_count, MockWrite* writes, |
73 size_t writes_count); | 73 size_t writes_count); |
74 void PopulateConnectRequestIR(SpdyHeaderBlock* syn_ir); | 74 void PopulateConnectRequestIR(SpdyHeaderBlock* syn_ir); |
75 void PopulateConnectReplyIR(SpdyHeaderBlock* block, const char* status); | 75 void PopulateConnectReplyIR(SpdyHeaderBlock* block, const char* status); |
76 SpdyFrame* ConstructConnectRequestFrame(); | 76 SpdyFrame* ConstructConnectRequestFrame(); |
77 SpdyFrame* ConstructConnectAuthRequestFrame(); | 77 SpdyFrame* ConstructConnectAuthRequestFrame(); |
78 SpdyFrame* ConstructConnectReplyFrame(); | 78 SpdyFrame* ConstructConnectReplyFrame(); |
79 SpdyFrame* ConstructConnectAuthReplyFrame(); | 79 SpdyFrame* ConstructConnectAuthReplyFrame(); |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 | 1374 |
1375 EXPECT_FALSE(sock_.get()); | 1375 EXPECT_FALSE(sock_.get()); |
1376 EXPECT_TRUE(read_callback.have_result()); | 1376 EXPECT_TRUE(read_callback.have_result()); |
1377 EXPECT_FALSE(write_callback_.have_result()); | 1377 EXPECT_FALSE(write_callback_.have_result()); |
1378 | 1378 |
1379 // Let the RST_STREAM write while |rst| is in-scope. | 1379 // Let the RST_STREAM write while |rst| is in-scope. |
1380 base::MessageLoop::current()->RunUntilIdle(); | 1380 base::MessageLoop::current()->RunUntilIdle(); |
1381 } | 1381 } |
1382 | 1382 |
1383 } // namespace net | 1383 } // namespace net |
OLD | NEW |