Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Side by Side Diff: components/grpc_support/bidirectional_stream_unittest.cc

Issue 2836063005: [cronet] Add mechanism for restarting CronetEnvironment (Closed)
Patch Set: per #5 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 {
42 ShutdownQuicTestServer(); 43 ShutdownQuicTestServer();
44 ShutdownTestStreamEngine();
mef 2017/04/26 22:19:41 I'd move it above ShutdownQuicTestServer() to make
lilyhoughton 2017/04/27 13:53:39 Done.
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
52 private: 54 private:
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698