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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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_client_stream.cc ('k') | net/quic/quic_framer_test.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_fec_group.h" 5 #include "net/quic/quic_fec_group.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 14
15 using ::testing::_; 15 using ::testing::_;
16 using base::StringPiece; 16 using base::StringPiece;
17 17
18 namespace net { 18 namespace net {
19 19
20 namespace { 20 namespace {
21 21
22 const char* kData[] = { 22 const char* const kData[] = {
23 "abc12345678", 23 "abc12345678",
24 "987defg", 24 "987defg",
25 "ghi12345", 25 "ghi12345",
26 "987jlkmno", 26 "987jlkmno",
27 "mno4567890", 27 "mno4567890",
28 "789pqrstuvw", 28 "789pqrstuvw",
29 }; 29 };
30 30
31 const bool kEntropyFlag[] = { 31 const bool kEntropyFlag[] = {
32 false, 32 false,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 fec.redundancy = kData[0]; 233 fec.redundancy = kData[0];
234 ASSERT_TRUE(group.UpdateFec(ENCRYPTION_FORWARD_SECURE, 7, fec)); 234 ASSERT_TRUE(group.UpdateFec(ENCRYPTION_FORWARD_SECURE, 7, fec));
235 EXPECT_EQ(ENCRYPTION_INITIAL, group.effective_encryption_level()); 235 EXPECT_EQ(ENCRYPTION_INITIAL, group.effective_encryption_level());
236 236
237 header.packet_sequence_number = 3; 237 header.packet_sequence_number = 3;
238 ASSERT_TRUE(group.Update(ENCRYPTION_NONE, header, kData[0])); 238 ASSERT_TRUE(group.Update(ENCRYPTION_NONE, header, kData[0]));
239 EXPECT_EQ(ENCRYPTION_NONE, group.effective_encryption_level()); 239 EXPECT_EQ(ENCRYPTION_NONE, group.effective_encryption_level());
240 } 240 }
241 241
242 } // namespace net 242 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_crypto_client_stream.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698