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

Side by Side Diff: net/quic/core/quic_connection_test.cc

Issue 2649573002: Remove original_path_id from SerializedPacket and OnPacketSent. (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_packet_creator.cc » ('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/core/quic_connection.h" 5 #include "net/quic/core/quic_connection.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <memory> 8 #include <memory>
9 #include <ostream> 9 #include <ostream>
10 #include <utility> 10 #include <utility>
(...skipping 4865 matching lines...) Expand 10 before | Expand all | Expand 10 after
4876 CongestionBlockWrites(); 4876 CongestionBlockWrites();
4877 SendAckPacketToPeer(); 4877 SendAckPacketToPeer();
4878 } 4878 }
4879 4879
4880 TEST_P(QuicConnectionTest, SendPingImmediately) { 4880 TEST_P(QuicConnectionTest, SendPingImmediately) {
4881 MockQuicConnectionDebugVisitor debug_visitor; 4881 MockQuicConnectionDebugVisitor debug_visitor;
4882 connection_.set_debug_visitor(&debug_visitor); 4882 connection_.set_debug_visitor(&debug_visitor);
4883 4883
4884 CongestionBlockWrites(); 4884 CongestionBlockWrites();
4885 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1); 4885 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
4886 EXPECT_CALL(debug_visitor, OnPacketSent(_, _, _, _, _)).Times(1); 4886 EXPECT_CALL(debug_visitor, OnPacketSent(_, _, _, _)).Times(1);
4887 EXPECT_CALL(debug_visitor, OnPingSent()).Times(1); 4887 EXPECT_CALL(debug_visitor, OnPingSent()).Times(1);
4888 connection_.SendPing(); 4888 connection_.SendPing();
4889 EXPECT_FALSE(connection_.HasQueuedData()); 4889 EXPECT_FALSE(connection_.HasQueuedData());
4890 } 4890 }
4891 4891
4892 TEST_P(QuicConnectionTest, SendBlockedImmediately) { 4892 TEST_P(QuicConnectionTest, SendBlockedImmediately) {
4893 MockQuicConnectionDebugVisitor debug_visitor; 4893 MockQuicConnectionDebugVisitor debug_visitor;
4894 connection_.set_debug_visitor(&debug_visitor); 4894 connection_.set_debug_visitor(&debug_visitor);
4895 4895
4896 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1); 4896 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
4897 EXPECT_CALL(debug_visitor, OnPacketSent(_, _, _, _, _)).Times(1); 4897 EXPECT_CALL(debug_visitor, OnPacketSent(_, _, _, _)).Times(1);
4898 EXPECT_EQ(0u, connection_.GetStats().blocked_frames_sent); 4898 EXPECT_EQ(0u, connection_.GetStats().blocked_frames_sent);
4899 connection_.SendBlocked(3); 4899 connection_.SendBlocked(3);
4900 EXPECT_EQ(1u, connection_.GetStats().blocked_frames_sent); 4900 EXPECT_EQ(1u, connection_.GetStats().blocked_frames_sent);
4901 EXPECT_FALSE(connection_.HasQueuedData()); 4901 EXPECT_FALSE(connection_.HasQueuedData());
4902 } 4902 }
4903 4903
4904 TEST_P(QuicConnectionTest, SendingUnencryptedStreamDataFails) { 4904 TEST_P(QuicConnectionTest, SendingUnencryptedStreamDataFails) {
4905 EXPECT_CALL(visitor_, 4905 EXPECT_CALL(visitor_,
4906 OnConnectionClosed(QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA, 4906 OnConnectionClosed(QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA,
4907 _, ConnectionCloseSource::FROM_SELF)); 4907 _, ConnectionCloseSource::FROM_SELF));
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
5117 error_details, ConnectionCloseSource::FROM_PEER)); 5117 error_details, ConnectionCloseSource::FROM_PEER));
5118 connection_.set_perspective(Perspective::IS_CLIENT); 5118 connection_.set_perspective(Perspective::IS_CLIENT);
5119 connection_.CloseConnection(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT, 5119 connection_.CloseConnection(QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT,
5120 error_details, 5120 error_details,
5121 ConnectionCloseBehavior::SILENT_CLOSE); 5121 ConnectionCloseBehavior::SILENT_CLOSE);
5122 } 5122 }
5123 5123
5124 } // namespace 5124 } // namespace
5125 } // namespace test 5125 } // namespace test
5126 } // namespace net 5126 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_connection.cc ('k') | net/quic/core/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698