OLD | NEW |
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 Loading... |
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 |
OLD | NEW |