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

Unified Diff: net/tools/quic/quic_server_session_test.cc

Issue 23691073: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compiler/unittests fix Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_reliable_server_stream_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server_session_test.cc
diff --git a/net/tools/quic/quic_server_session_test.cc b/net/tools/quic/quic_server_session_test.cc
index ef3674b5e99d8ae8f303f9facbbc789d61bd09d2..a6f94abd7ba62d938efc59bd6faa0415a6917940 100644
--- a/net/tools/quic/quic_server_session_test.cc
+++ b/net/tools/quic/quic_server_session_test.cc
@@ -130,8 +130,7 @@ TEST_F(QuicServerSessionTest, CloseStreamDueToReset) {
QuicStreamFrame data1(3, false, 0, "HT");
vector<QuicStreamFrame> frames;
frames.push_back(data1);
- EXPECT_TRUE(visitor_->OnPacket(IPEndPoint(), IPEndPoint(),
- header, frames));
+ EXPECT_TRUE(visitor_->OnStreamFrames(frames));
EXPECT_EQ(1u, session_->GetNumOpenStreams());
// Pretend we got full headers, so we won't trigger the 'unrecoverable
@@ -144,8 +143,7 @@ TEST_F(QuicServerSessionTest, CloseStreamDueToReset) {
EXPECT_EQ(0u, session_->GetNumOpenStreams());
// Send the same two bytes of payload in a new packet.
- EXPECT_TRUE(visitor_->OnPacket(IPEndPoint(), IPEndPoint(),
- header, frames));
+ EXPECT_TRUE(visitor_->OnStreamFrames(frames));
// The stream should not be re-opened.
EXPECT_EQ(0u, session_->GetNumOpenStreams());
@@ -171,8 +169,7 @@ TEST_F(QuicServerSessionTest, NeverOpenStreamDueToReset) {
// unrecoverable compression context state.
EXPECT_CALL(*connection_, SendConnectionClose(
QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED));
- EXPECT_FALSE(visitor_->OnPacket(IPEndPoint(), IPEndPoint(),
- header, frames));
+ EXPECT_FALSE(visitor_->OnStreamFrames(frames));
// The stream should never be opened, now that the reset is received.
EXPECT_EQ(0u, session_->GetNumOpenStreams());
@@ -193,8 +190,7 @@ TEST_F(QuicServerSessionTest, GoOverPrematureClosedStreamLimit) {
EXPECT_CALL(*connection_, SendConnectionClose(
QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED));
- EXPECT_FALSE(visitor_->OnPacket(IPEndPoint(), IPEndPoint(),
- header, frames));
+ EXPECT_FALSE(visitor_->OnStreamFrames(frames));
}
TEST_F(QuicServerSessionTest, AcceptClosedStream) {
@@ -206,8 +202,7 @@ TEST_F(QuicServerSessionTest, AcceptClosedStream) {
// Send (empty) compressed headers followed by two bytes of data.
frames.push_back(QuicStreamFrame(3, false, 0, "\1\0\0\0\0\0\0\0HT"));
frames.push_back(QuicStreamFrame(5, false, 0, "\2\0\0\0\0\0\0\0HT"));
- EXPECT_TRUE(visitor_->OnPacket(IPEndPoint(), IPEndPoint(),
- header, frames));
+ EXPECT_TRUE(visitor_->OnStreamFrames(frames));
// Pretend we got full headers, so we won't trigger the 'unercoverable
// compression context' state.
@@ -223,8 +218,7 @@ TEST_F(QuicServerSessionTest, AcceptClosedStream) {
frames.clear();
frames.push_back(QuicStreamFrame(3, false, 2, "TP"));
frames.push_back(QuicStreamFrame(5, false, 2, "TP"));
- EXPECT_TRUE(visitor_->OnPacket(IPEndPoint(), IPEndPoint(),
- header, frames));
+ EXPECT_TRUE(visitor_->OnStreamFrames(frames));
}
TEST_F(QuicServerSessionTest, MaxNumConnections) {
« no previous file with comments | « net/tools/quic/quic_reliable_server_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698