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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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_crypto_stream.cc ('k') | net/quic/quic_end_to_end_unittest.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_crypto_stream.h" 5 #include "net/quic/quic_crypto_stream.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 sizeof(uint16); // padding 95 sizeof(uint16); // padding
96 EXPECT_EQ(1, bad[kFirstTagIndex]); 96 EXPECT_EQ(1, bad[kFirstTagIndex]);
97 bad[kFirstTagIndex] = 0x7F; // out of order tag 97 bad[kFirstTagIndex] = 0x7F; // out of order tag
98 98
99 EXPECT_CALL(*connection_, 99 EXPECT_CALL(*connection_,
100 SendConnectionClose(QUIC_CRYPTO_TAGS_OUT_OF_ORDER)); 100 SendConnectionClose(QUIC_CRYPTO_TAGS_OUT_OF_ORDER));
101 EXPECT_EQ(0u, stream_.ProcessRawData(bad.data(), bad.length())); 101 EXPECT_EQ(0u, stream_.ProcessRawData(bad.data(), bad.length()));
102 } 102 }
103 103
104 TEST_F(QuicCryptoStreamTest, NoConnectionLevelFlowControl) { 104 TEST_F(QuicCryptoStreamTest, NoConnectionLevelFlowControl) {
105 if (connection_->version() < QUIC_VERSION_21) { 105 EXPECT_TRUE(stream_.flow_controller()->IsEnabled());
106 EXPECT_FALSE(stream_.flow_controller()->IsEnabled());
107 } else {
108 EXPECT_TRUE(stream_.flow_controller()->IsEnabled());
109 }
110 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl( 106 EXPECT_FALSE(ReliableQuicStreamPeer::StreamContributesToConnectionFlowControl(
111 &stream_)); 107 &stream_));
112 } 108 }
113 109
114 } // namespace 110 } // namespace
115 } // namespace test 111 } // namespace test
116 } // namespace net 112 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_stream.cc ('k') | net/quic/quic_end_to_end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698