| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stdint.h> | 5 #include <stdint.h> |
| 6 #include <list> | 6 #include <list> |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const bidirectional_stream_header_array kTestHeadersArray = {2, 2, | 29 const bidirectional_stream_header_array kTestHeadersArray = {2, 2, |
| 30 kTestHeaders}; | 30 kTestHeaders}; |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 namespace grpc_support { | 33 namespace grpc_support { |
| 34 | 34 |
| 35 class BidirectionalStreamTest : public ::testing::TestWithParam<bool> { | 35 class BidirectionalStreamTest : public ::testing::TestWithParam<bool> { |
| 36 protected: | 36 protected: |
| 37 void SetUp() override { | 37 void SetUp() override { |
| 38 StartQuicTestServer(); | 38 StartQuicTestServer(); |
| 39 StartTestStreamEngine(GetQuicTestServerPort()); |
| 39 } | 40 } |
| 40 | 41 |
| 41 void TearDown() override { | 42 void TearDown() override { |
| 43 ShutdownTestStreamEngine(); |
| 42 ShutdownQuicTestServer(); | 44 ShutdownQuicTestServer(); |
| 43 } | 45 } |
| 44 | 46 |
| 45 BidirectionalStreamTest() {} | 47 BidirectionalStreamTest() {} |
| 46 ~BidirectionalStreamTest() override {} | 48 ~BidirectionalStreamTest() override {} |
| 47 | 49 |
| 48 stream_engine* engine() { | 50 stream_engine* engine() { |
| 49 return GetTestStreamEngine(GetQuicTestServerPort()); | 51 return GetTestStreamEngine(GetQuicTestServerPort()); |
| 50 } | 52 } |
| 51 | 53 |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step); | 650 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step); |
| 649 ASSERT_EQ(net::ERR_NAME_NOT_RESOLVED, test.net_error); | 651 ASSERT_EQ(net::ERR_NAME_NOT_RESOLVED, test.net_error); |
| 650 bidirectional_stream_destroy(test.stream); | 652 bidirectional_stream_destroy(test.stream); |
| 651 } | 653 } |
| 652 | 654 |
| 653 INSTANTIATE_TEST_CASE_P(BidirectionalStreamDelayRequestHeadersUntilFlush, | 655 INSTANTIATE_TEST_CASE_P(BidirectionalStreamDelayRequestHeadersUntilFlush, |
| 654 BidirectionalStreamTest, | 656 BidirectionalStreamTest, |
| 655 ::testing::Values(true, false)); | 657 ::testing::Values(true, false)); |
| 656 | 658 |
| 657 } // namespace grpc_support | 659 } // namespace grpc_support |
| OLD | NEW |