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

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

Issue 1979743002: Rename the QUIC stream frame fields frame_buffer and frame_length to data_buffer and data_length be… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@121700577
Patch Set: Created 4 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
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_framer.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/quic_connection.h" 5 #include "net/quic/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 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 1903
1904 EXPECT_EQ(0u, connection_.NumQueuedPackets()); 1904 EXPECT_EQ(0u, connection_.NumQueuedPackets());
1905 EXPECT_FALSE(connection_.HasQueuedData()); 1905 EXPECT_FALSE(connection_.HasQueuedData());
1906 1906
1907 // Parse the last packet and ensure multiple iovector blocks have 1907 // Parse the last packet and ensure multiple iovector blocks have
1908 // been packed into a single stream frame from one stream. 1908 // been packed into a single stream frame from one stream.
1909 EXPECT_EQ(1u, writer_->frame_count()); 1909 EXPECT_EQ(1u, writer_->frame_count());
1910 EXPECT_EQ(1u, writer_->stream_frames().size()); 1910 EXPECT_EQ(1u, writer_->stream_frames().size());
1911 QuicStreamFrame* frame = writer_->stream_frames()[0]; 1911 QuicStreamFrame* frame = writer_->stream_frames()[0];
1912 EXPECT_EQ(1u, frame->stream_id); 1912 EXPECT_EQ(1u, frame->stream_id);
1913 EXPECT_EQ("ABCD", StringPiece(frame->frame_buffer, frame->frame_length)); 1913 EXPECT_EQ("ABCD", StringPiece(frame->data_buffer, frame->data_length));
1914 } 1914 }
1915 1915
1916 TEST_P(QuicConnectionTest, FramePackingSendvQueued) { 1916 TEST_P(QuicConnectionTest, FramePackingSendvQueued) {
1917 // Try to send two stream frames in 1 packet by using writev. 1917 // Try to send two stream frames in 1 packet by using writev.
1918 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)); 1918 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _));
1919 1919
1920 BlockOnNextWrite(); 1920 BlockOnNextWrite();
1921 char data[] = "ABCD"; 1921 char data[] = "ABCD";
1922 struct iovec iov[2]; 1922 struct iovec iov[2];
1923 iov[0].iov_base = data; 1923 iov[0].iov_base = data;
(...skipping 3035 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 EXPECT_CALL(visitor_, OnConnectionClosed(_, _, _)).Times(1); 4959 EXPECT_CALL(visitor_, OnConnectionClosed(_, _, _)).Times(1);
4960 connection_.CloseConnection(QUIC_NO_ERROR, "no reason", 4960 connection_.CloseConnection(QUIC_NO_ERROR, "no reason",
4961 ConnectionCloseBehavior::SILENT_CLOSE); 4961 ConnectionCloseBehavior::SILENT_CLOSE);
4962 connection_.CloseConnection(QUIC_NO_ERROR, "no reason", 4962 connection_.CloseConnection(QUIC_NO_ERROR, "no reason",
4963 ConnectionCloseBehavior::SILENT_CLOSE); 4963 ConnectionCloseBehavior::SILENT_CLOSE);
4964 } 4964 }
4965 4965
4966 } // namespace 4966 } // namespace
4967 } // namespace test 4967 } // namespace test
4968 } // namespace net 4968 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698