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

Side by Side Diff: net/quic/quic_reliable_client_stream_test.cc

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/quic/quic_reliable_client_stream.h" 5 #include "net/quic/quic_reliable_client_stream.h"
6 6
7 #include "net/base/net_errors.h" 7 #include "net/base/net_errors.h"
8 #include "net/quic/quic_client_session.h" 8 #include "net/quic/quic_client_session.h"
9 #include "net/quic/quic_utils.h" 9 #include "net/quic/quic_utils.h"
10 #include "net/quic/test_tools/quic_test_utils.h" 10 #include "net/quic/test_tools/quic_test_utils.h"
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 QuicReliableClientStreamTest() 36 QuicReliableClientStreamTest()
37 : session_(new MockConnection(1, IPEndPoint(), false), false), 37 : session_(new MockConnection(1, IPEndPoint(), false), false),
38 stream_(1, &session_, BoundNetLog()) { 38 stream_(1, &session_, BoundNetLog()) {
39 stream_.SetDelegate(&delegate_); 39 stream_.SetDelegate(&delegate_);
40 } 40 }
41 41
42 testing::StrictMock<MockDelegate> delegate_; 42 testing::StrictMock<MockDelegate> delegate_;
43 MockSession session_; 43 MockSession session_;
44 QuicReliableClientStream stream_; 44 QuicReliableClientStream stream_;
45 QuicConfig config_;
46 QuicCryptoClientConfig crypto_config_;
45 }; 47 };
46 48
47 TEST_F(QuicReliableClientStreamTest, TerminateFromPeer) { 49 TEST_F(QuicReliableClientStreamTest, TerminateFromPeer) {
48 EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR)); 50 EXPECT_CALL(delegate_, OnClose(QUIC_NO_ERROR));
49 51
50 stream_.TerminateFromPeer(true); 52 stream_.TerminateFromPeer(true);
51 } 53 }
52 54
53 TEST_F(QuicReliableClientStreamTest, ProcessData) { 55 TEST_F(QuicReliableClientStreamTest, ProcessData) {
54 const char data[] = "hello world!"; 56 const char data[] = "hello world!";
(...skipping 17 matching lines...) Expand all
72 TEST_F(QuicReliableClientStreamTest, OnError) { 74 TEST_F(QuicReliableClientStreamTest, OnError) {
73 EXPECT_CALL(delegate_, OnError(ERR_INTERNET_DISCONNECTED)); 75 EXPECT_CALL(delegate_, OnError(ERR_INTERNET_DISCONNECTED));
74 76
75 stream_.OnError(ERR_INTERNET_DISCONNECTED); 77 stream_.OnError(ERR_INTERNET_DISCONNECTED);
76 EXPECT_FALSE(stream_.GetDelegate()); 78 EXPECT_FALSE(stream_.GetDelegate());
77 } 79 }
78 80
79 } // namespace 81 } // namespace
80 } // namespace test 82 } // namespace test
81 } // namespace net 83 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698