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

Side by Side Diff: net/tools/quic/quic_spdy_client_stream_test.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/tools/quic/quic_spdy_client_stream.h" 5 #include "net/tools/quic/quic_spdy_client_stream.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "net/quic/quic_utils.h" 8 #include "net/quic/quic_utils.h"
9 #include "net/quic/test_tools/crypto_test_utils.h" 9 #include "net/quic/test_tools/crypto_test_utils.h"
10 #include "net/quic/test_tools/quic_test_utils.h" 10 #include "net/quic/test_tools/quic_test_utils.h"
11 #include "net/tools/quic/quic_client_session.h" 11 #include "net/tools/quic/quic_client_session.h"
12 #include "net/tools/quic/quic_spdy_client_stream.h" 12 #include "net/tools/quic/quic_spdy_client_stream.h"
13 #include "net/tools/quic/spdy_balsa_utils.h" 13 #include "net/tools/quic/spdy_balsa_utils.h"
14 #include "testing/gmock/include/gmock/gmock.h" 14 #include "testing/gmock/include/gmock/gmock.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 using net::test::CryptoTestUtils; 17 using net::test::CryptoTestUtils;
18 using net::test::DefaultQuicConfig; 18 using net::test::DefaultQuicConfig;
19 using net::test::MockConnection; 19 using net::test::MockConnection;
20 using net::test::MockHelper; 20 using net::test::MockConnectionHelper;
21 using net::test::SupportedVersions; 21 using net::test::SupportedVersions;
22 using net::test::kClientDataStreamId1; 22 using net::test::kClientDataStreamId1;
23 using net::test::kInitialSessionFlowControlWindowForTest; 23 using net::test::kInitialSessionFlowControlWindowForTest;
24 using net::test::kInitialStreamFlowControlWindowForTest; 24 using net::test::kInitialStreamFlowControlWindowForTest;
25 25
26 using std::string; 26 using std::string;
27 using testing::StrictMock; 27 using testing::StrictMock;
28 using testing::TestWithParam; 28 using testing::TestWithParam;
29 29
30 namespace net { 30 namespace net {
(...skipping 22 matching lines...) Expand all
53 53
54 // New streams rely on having the peer's flow control receive window 54 // New streams rely on having the peer's flow control receive window
55 // negotiated in the config. 55 // negotiated in the config.
56 session_.config()->SetInitialStreamFlowControlWindowToSend( 56 session_.config()->SetInitialStreamFlowControlWindowToSend(
57 kInitialStreamFlowControlWindowForTest); 57 kInitialStreamFlowControlWindowForTest);
58 session_.config()->SetInitialSessionFlowControlWindowToSend( 58 session_.config()->SetInitialSessionFlowControlWindowToSend(
59 kInitialSessionFlowControlWindowForTest); 59 kInitialSessionFlowControlWindowForTest);
60 stream_.reset(new QuicSpdyClientStream(kClientDataStreamId1, &session_)); 60 stream_.reset(new QuicSpdyClientStream(kClientDataStreamId1, &session_));
61 } 61 }
62 62
63 MockHelper helper_; 63 MockConnectionHelper helper_;
64 StrictMock<MockConnection>* connection_; 64 StrictMock<MockConnection>* connection_;
65 QuicCryptoClientConfig crypto_config_; 65 QuicCryptoClientConfig crypto_config_;
66 QuicClientSession session_; 66 QuicClientSession session_;
67 scoped_ptr<QuicSpdyClientStream> stream_; 67 scoped_ptr<QuicSpdyClientStream> stream_;
68 BalsaHeaders headers_; 68 BalsaHeaders headers_;
69 string headers_string_; 69 string headers_string_;
70 string body_; 70 string body_;
71 }; 71 };
72 72
73 TEST_F(QuicSpdyClientStreamTest, TestFraming) { 73 TEST_F(QuicSpdyClientStreamTest, TestFraming) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 EXPECT_FALSE(stream_->write_side_closed()); 114 EXPECT_FALSE(stream_->write_side_closed());
115 stream_->OnStreamFrame(frame); 115 stream_->OnStreamFrame(frame);
116 EXPECT_TRUE(stream_->write_side_closed()); 116 EXPECT_TRUE(stream_->write_side_closed());
117 } 117 }
118 118
119 } // namespace 119 } // namespace
120 } // namespace test 120 } // namespace test
121 } // namespace tools 121 } // namespace tools
122 } // namespace net 122 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_test.cc ('k') | net/tools/quic/quic_spdy_server_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698