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

Side by Side Diff: net/spdy/hpack/hpack_static_table_test.cc

Issue 2101863004: net: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/spdy/hpack/hpack_header_table.cc ('k') | net/ssl/client_key_store.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 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/spdy/hpack/hpack_static_table.h" 5 #include "net/spdy/hpack/hpack_static_table.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "net/base/net_export.h" 10 #include "net/base/net_export.h"
(...skipping 22 matching lines...) Expand all
33 33
34 HpackHeaderTable::EntryTable static_entries = table_.GetStaticEntries(); 34 HpackHeaderTable::EntryTable static_entries = table_.GetStaticEntries();
35 EXPECT_EQ(static_table.size(), static_entries.size()); 35 EXPECT_EQ(static_table.size(), static_entries.size());
36 36
37 HpackHeaderTable::UnorderedEntrySet static_index = table_.GetStaticIndex(); 37 HpackHeaderTable::UnorderedEntrySet static_index = table_.GetStaticIndex();
38 EXPECT_EQ(static_table.size(), static_index.size()); 38 EXPECT_EQ(static_table.size(), static_index.size());
39 39
40 HpackHeaderTable::NameToEntryMap static_name_index = 40 HpackHeaderTable::NameToEntryMap static_name_index =
41 table_.GetStaticNameIndex(); 41 table_.GetStaticNameIndex();
42 std::set<base::StringPiece> names; 42 std::set<base::StringPiece> names;
43 for (auto entry : static_index) { 43 for (auto* entry : static_index) {
44 names.insert(entry->name()); 44 names.insert(entry->name());
45 } 45 }
46 EXPECT_EQ(names.size(), static_name_index.size()); 46 EXPECT_EQ(names.size(), static_name_index.size());
47 } 47 }
48 48
49 // Test that ObtainHpackStaticTable returns the same instance every time. 49 // Test that ObtainHpackStaticTable returns the same instance every time.
50 TEST_F(HpackStaticTableTest, IsSingleton) { 50 TEST_F(HpackStaticTableTest, IsSingleton) {
51 const HpackStaticTable* static_table_one = &ObtainHpackStaticTable(); 51 const HpackStaticTable* static_table_one = &ObtainHpackStaticTable();
52 const HpackStaticTable* static_table_two = &ObtainHpackStaticTable(); 52 const HpackStaticTable* static_table_two = &ObtainHpackStaticTable();
53 EXPECT_EQ(static_table_one, static_table_two); 53 EXPECT_EQ(static_table_one, static_table_two);
54 } 54 }
55 55
56 } // namespace 56 } // namespace
57 57
58 } // namespace test 58 } // namespace test
59 59
60 } // namespace net 60 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/hpack/hpack_header_table.cc ('k') | net/ssl/client_key_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698