summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_connection_helper_test.cc
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 18:37:44 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 18:37:44 +0000
commited3fc15d1ce8fd21b2e97644d8a102e0e1215199 (patch)
tree15d807a22b47ae1c3460e4e33aa7fb4d9a19baf4 /net/quic/quic_connection_helper_test.cc
parent7f201e739dfcd6f7ba16bce97a60dab84547d864 (diff)
downloadchromium_src-ed3fc15d1ce8fd21b2e97644d8a102e0e1215199.zip
chromium_src-ed3fc15d1ce8fd21b2e97644d8a102e0e1215199.tar.gz
chromium_src-ed3fc15d1ce8fd21b2e97644d8a102e0e1215199.tar.bz2
Land Recent QUIC Changes
Remove the kAESH tag (AES CBC mode with HMAC) because we won't support it. Merge internal change: 43418211 Get client to the point where it can do key agreement. This small change completes allows the client to perform an anonymous DH handshake. After this, plumbing the pre-master secret into the KDF and enabling the encrypter/decrypter should Just Work. More crypto handshake work. This change brings back the non-crypto parts of the negotiation, outside of crypto/. Merge internal change: 43400046 More work on crypto handshake. This change: * Removes the rest of the non-crypto related parameters from crypto/. * Enables actual key-negotiation on the server. Next step is to enable the non-crypto parameters to be negotiated again. Merge internal change: 43175686 Inform the congestion manager if a sent packet has data in it, or only acks. The TCP manager does not could ack-only packets against the congestion window. Merge internal change: 43304285 R=rtenneti@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/12559005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_connection_helper_test.cc')
-rw-r--r--net/quic/quic_connection_helper_test.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/quic/quic_connection_helper_test.cc b/net/quic/quic_connection_helper_test.cc
index 1d0c062..544dec4 100644
--- a/net/quic/quic_connection_helper_test.cc
+++ b/net/quic/quic_connection_helper_test.cc
@@ -23,6 +23,7 @@ namespace net {
namespace test {
const char kData[] = "foo";
+const bool kHasData = true;
class TestConnection : public QuicConnection {
public:
@@ -248,7 +249,7 @@ TEST_F(QuicConnectionHelperTest, SetAckAlarm) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(delta.ToMicroseconds()),
runner_->GetPostedTasks()[1].delay);
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false));
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false, !kHasData));
runner_->RunNextTask();
EXPECT_EQ(QuicTime::Zero().Add(delta), clock_.ApproximateNow());
}
@@ -292,7 +293,7 @@ TEST_F(QuicConnectionHelperTest, ResetAckAlarm) {
// Verify that the ack alarm task has been re-posted.
ASSERT_EQ(2u, runner_->GetPostedTasks().size());
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false));
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false, !kHasData));
runner_->RunNextTask();
EXPECT_EQ(QuicTime::Zero().Add(delta2), clock_.ApproximateNow());
}
@@ -306,10 +307,10 @@ TEST_F(QuicConnectionHelperTest, TestRetransmission) {
QuicTime::Delta::FromMilliseconds(500);
QuicTime start = clock_.ApproximateNow();
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false));
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false, kHasData));
// Send a packet.
connection_->SendStreamData(1, kData, 0, false);
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 2, _, true));
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 2, _, true, kHasData));
// Since no ack was received, the retransmission alarm will fire and
// retransmit it.
runner_->RunNextTask();
@@ -328,7 +329,7 @@ TEST_F(QuicConnectionHelperTest, InitialTimeout) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(kDefaultTimeoutUs),
runner_->GetPostedTasks().front().delay);
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false));
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false, !kHasData));
// After we run the next task, we should close the connection.
EXPECT_CALL(visitor_, ConnectionClose(QUIC_CONNECTION_TIMED_OUT, false));
@@ -373,7 +374,7 @@ TEST_F(QuicConnectionHelperTest, TimeoutAfterSend) {
// When we send a packet, the timeout will change to 5000 + kDefaultTimeout.
clock_.AdvanceTime(QuicTime::Delta::FromMicroseconds(5000));
EXPECT_EQ(5000u, clock_.ApproximateNow().ToMicroseconds());
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false));
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false, !kHasData));
// Send an ack so we don't set the retransmission alarm.
connection_->SendAck();
@@ -388,7 +389,7 @@ TEST_F(QuicConnectionHelperTest, TimeoutAfterSend) {
// This time, we should time out.
EXPECT_CALL(visitor_, ConnectionClose(QUIC_CONNECTION_TIMED_OUT, false));
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 2, _, false));
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 2, _, false, !kHasData));
runner_->RunNextTask();
EXPECT_EQ(kDefaultTimeoutUs + 5000, clock_.ApproximateNow().ToMicroseconds());
EXPECT_FALSE(connection_->connected());
@@ -404,8 +405,8 @@ TEST_F(QuicConnectionHelperTest, SendSchedulerDelayThenSend) {
testing::Return(QuicTime::Delta::FromMicroseconds(1)));
QuicPacket* packet = ConstructRawDataPacket(1);
- connection_->SendOrQueuePacket(1, packet, 0);
- EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false));
+ connection_->SendOrQueuePacket(1, packet, 0, kHasData);
+ EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, false, kHasData));
EXPECT_EQ(1u, connection_->NumQueuedPackets());
// Advance the clock to fire the alarm, and configure the scheduler