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

Unified Diff: net/quic/quic_chromium_client_stream_test.cc

Issue 1983183002: Landing Recent QUIC changes until 5/14/2016 02:25:25 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: "first try to fix link error for win_clang build" 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_chromium_client_session_test.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_chromium_client_stream_test.cc
diff --git a/net/quic/quic_chromium_client_stream_test.cc b/net/quic/quic_chromium_client_stream_test.cc
index 3e56cc7737db749d3590616c9289c14cdd1b18a4..83a3b02e8b1c335ec517233dc6f6630bd2ff31eb 100644
--- a/net/quic/quic_chromium_client_stream_test.cc
+++ b/net/quic/quic_chromium_client_stream_test.cc
@@ -66,8 +66,9 @@ class MockQuicClientSessionBase : public QuicClientSessionBase {
MOCK_METHOD1(CreateIncomingDynamicStream, QuicSpdyStream*(QuicStreamId id));
MOCK_METHOD1(CreateOutgoingDynamicStream,
QuicChromiumClientStream*(SpdyPriority priority));
- MOCK_METHOD5(WritevData,
- QuicConsumedData(QuicStreamId id,
+ MOCK_METHOD6(WritevData,
+ QuicConsumedData(ReliableQuicStream* stream,
+ QuicStreamId id,
QuicIOVector data,
QuicStreamOffset offset,
bool fin,
@@ -133,7 +134,7 @@ MockQuicClientSessionBase::MockQuicClientSessionBase(
DefaultQuicConfig()) {
crypto_stream_.reset(new QuicCryptoStream(this));
Initialize();
- ON_CALL(*this, WritevData(_, _, _, _, _))
+ ON_CALL(*this, WritevData(_, _, _, _, _, _))
.WillByDefault(testing::Return(QuicConsumedData(0, false)));
}
@@ -434,7 +435,7 @@ TEST_P(QuicChromiumClientStreamTest, WriteStreamData) {
const size_t kDataLen = arraysize(kData1);
// All data written.
- EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _))
+ EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _, _))
.WillOnce(Return(QuicConsumedData(kDataLen, true)));
TestCompletionCallback callback;
EXPECT_EQ(OK, stream_->WriteStreamData(base::StringPiece(kData1, kDataLen),
@@ -449,7 +450,7 @@ TEST_P(QuicChromiumClientStreamTest, WriteStreamDataAsync) {
const size_t kDataLen = arraysize(kData1);
// No data written.
- EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _))
+ EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _, _))
.WillOnce(Return(QuicConsumedData(0, false)));
TestCompletionCallback callback;
EXPECT_EQ(ERR_IO_PENDING,
@@ -458,7 +459,7 @@ TEST_P(QuicChromiumClientStreamTest, WriteStreamDataAsync) {
ASSERT_FALSE(callback.have_result());
// All data written.
- EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _))
+ EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _, _))
.WillOnce(Return(QuicConsumedData(kDataLen, true)));
stream_->OnCanWrite();
ASSERT_TRUE(callback.have_result());
@@ -473,7 +474,7 @@ TEST_P(QuicChromiumClientStreamTest, WritevStreamData) {
new StringIOBuffer("Just a small payload"));
// All data written.
- EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _))
+ EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _, _))
.WillOnce(Return(QuicConsumedData(buf1->size(), false)))
.WillOnce(Return(QuicConsumedData(buf2->size(), true)));
TestCompletionCallback callback;
@@ -491,7 +492,7 @@ TEST_P(QuicChromiumClientStreamTest, WritevStreamDataAsync) {
new StringIOBuffer("Just a small payload"));
// Only a part of the data is written.
- EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _))
+ EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _, _))
// First piece of data is written.
.WillOnce(Return(QuicConsumedData(buf1->size(), false)))
// Second piece of data is queued.
@@ -504,7 +505,7 @@ TEST_P(QuicChromiumClientStreamTest, WritevStreamDataAsync) {
ASSERT_FALSE(callback.have_result());
// The second piece of data is written.
- EXPECT_CALL(session_, WritevData(stream_->id(), _, _, _, _))
+ EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _, _))
.WillOnce(Return(QuicConsumedData(buf2->size(), true)));
stream_->OnCanWrite();
ASSERT_TRUE(callback.have_result());
« no previous file with comments | « net/quic/quic_chromium_client_session_test.cc ('k') | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698