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

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

Issue 1159553007: Move Tuple to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « ipc/ipc_test_sink.h ('k') | ppapi/host/dispatch_host_message.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_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 session_.MarkWriteBlocked(stream2->id(), kSomeMiddlePriority); 377 session_.MarkWriteBlocked(stream2->id(), kSomeMiddlePriority);
378 session_.MarkWriteBlocked(stream6->id(), kSomeMiddlePriority); 378 session_.MarkWriteBlocked(stream6->id(), kSomeMiddlePriority);
379 session_.MarkWriteBlocked(stream4->id(), kSomeMiddlePriority); 379 session_.MarkWriteBlocked(stream4->id(), kSomeMiddlePriority);
380 380
381 EXPECT_CALL(*send_algorithm, TimeUntilSend(_, _, _)).WillRepeatedly( 381 EXPECT_CALL(*send_algorithm, TimeUntilSend(_, _, _)).WillRepeatedly(
382 Return(QuicTime::Delta::Zero())); 382 Return(QuicTime::Delta::Zero()));
383 EXPECT_CALL(*send_algorithm, GetCongestionWindow()) 383 EXPECT_CALL(*send_algorithm, GetCongestionWindow())
384 .WillRepeatedly(Return(kMaxPacketSize * 10)); 384 .WillRepeatedly(Return(kMaxPacketSize * 10));
385 EXPECT_CALL(*stream2, OnCanWrite()) 385 EXPECT_CALL(*stream2, OnCanWrite())
386 .WillOnce(IgnoreResult(Invoke(CreateFunctor( 386 .WillOnce(testing::IgnoreResult(Invoke(CreateFunctor(
387 &session_, &TestSession::SendStreamData, stream2->id())))); 387 &session_, &TestSession::SendStreamData, stream2->id()))));
388 EXPECT_CALL(*stream4, OnCanWrite()) 388 EXPECT_CALL(*stream4, OnCanWrite())
389 .WillOnce(IgnoreResult(Invoke(CreateFunctor( 389 .WillOnce(testing::IgnoreResult(Invoke(CreateFunctor(
390 &session_, &TestSession::SendStreamData, stream4->id())))); 390 &session_, &TestSession::SendStreamData, stream4->id()))));
391 EXPECT_CALL(*stream6, OnCanWrite()) 391 EXPECT_CALL(*stream6, OnCanWrite())
392 .WillOnce(IgnoreResult(Invoke(CreateFunctor( 392 .WillOnce(testing::IgnoreResult(Invoke(CreateFunctor(
393 &session_, &TestSession::SendStreamData, stream6->id())))); 393 &session_, &TestSession::SendStreamData, stream6->id()))));
394 394
395 // Expect that we only send one packet, the writes from different streams 395 // Expect that we only send one packet, the writes from different streams
396 // should be bundled together. 396 // should be bundled together.
397 MockPacketWriter* writer = 397 MockPacketWriter* writer =
398 static_cast<MockPacketWriter*>( 398 static_cast<MockPacketWriter*>(
399 QuicConnectionPeer::GetWriter(session_.connection())); 399 QuicConnectionPeer::GetWriter(session_.connection()));
400 EXPECT_CALL(*writer, WritePacket(_, _, _, _)).WillOnce( 400 EXPECT_CALL(*writer, WritePacket(_, _, _, _)).WillOnce(
401 Return(WriteResult(WRITE_STATUS_OK, 0))); 401 Return(WriteResult(WRITE_STATUS_OK, 0)));
402 EXPECT_CALL(*send_algorithm, OnPacketSent(_, _, _, _, _)).Times(1); 402 EXPECT_CALL(*send_algorithm, OnPacketSent(_, _, _, _, _)).Times(1);
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 EXPECT_TRUE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 4)); 984 EXPECT_TRUE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 4));
985 ASSERT_TRUE(session_.GetIncomingDataStream(2) != nullptr); 985 ASSERT_TRUE(session_.GetIncomingDataStream(2) != nullptr);
986 ASSERT_TRUE(session_.GetIncomingDataStream(4) != nullptr); 986 ASSERT_TRUE(session_.GetIncomingDataStream(4) != nullptr);
987 // And 5 should be not implicitly created. 987 // And 5 should be not implicitly created.
988 EXPECT_FALSE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 5)); 988 EXPECT_FALSE(QuicSessionPeer::IsStreamImplicitlyCreated(&session_, 5));
989 } 989 }
990 990
991 } // namespace 991 } // namespace
992 } // namespace test 992 } // namespace test
993 } // namespace net 993 } // namespace net
OLDNEW
« no previous file with comments | « ipc/ipc_test_sink.h ('k') | ppapi/host/dispatch_host_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698