OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromium/quic_utils_chromium.h" | 5 #include "net/quic/chromium/quic_utils_chromium.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "net/quic/core/crypto/crypto_protocol.h" | 9 #include "net/quic/core/crypto/crypto_protocol.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 namespace test { | 13 namespace test { |
14 namespace { | 14 namespace { |
15 | 15 |
16 TEST(QuicUtilsTest, ParseQuicConnectionOptions) { | 16 TEST(QuicUtilsChromiumTest, ParseQuicConnectionOptions) { |
17 QuicTagVector empty_options = ParseQuicConnectionOptions(""); | 17 QuicTagVector empty_options = ParseQuicConnectionOptions(""); |
18 EXPECT_TRUE(empty_options.empty()); | 18 EXPECT_TRUE(empty_options.empty()); |
19 | 19 |
20 QuicTagVector parsed_options = ParseQuicConnectionOptions("TIMER,TBBR,REJ"); | 20 QuicTagVector parsed_options = ParseQuicConnectionOptions("TIMER,TBBR,REJ"); |
21 QuicTagVector expected_options; | 21 QuicTagVector expected_options; |
22 expected_options.push_back(kTIME); | 22 expected_options.push_back(kTIME); |
23 expected_options.push_back(kTBBR); | 23 expected_options.push_back(kTBBR); |
24 expected_options.push_back(kREJ); | 24 expected_options.push_back(kREJ); |
25 EXPECT_EQ(expected_options, parsed_options); | 25 EXPECT_EQ(expected_options, parsed_options); |
26 } | 26 } |
(...skipping 25 matching lines...) Expand all Loading... |
52 EXPECT_EQ(20, FindOrDie(m, 10)); | 52 EXPECT_EQ(20, FindOrDie(m, 10)); |
53 | 53 |
54 // Make sure we can lookup values in a const map. | 54 // Make sure we can lookup values in a const map. |
55 const std::map<int, int>& const_m = m; | 55 const std::map<int, int>& const_m = m; |
56 EXPECT_EQ(20, FindOrDie(const_m, 10)); | 56 EXPECT_EQ(20, FindOrDie(const_m, 10)); |
57 } | 57 } |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 } // namespace test | 60 } // namespace test |
61 } // namespace net | 61 } // namespace net |
OLD | NEW |