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

Side by Side Diff: components/domain_reliability/google_configs_unittest.cc

Issue 2289763003: Remove stl_util use from domain_reliability. (Closed)
Patch Set: win Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/domain_reliability/google_configs.h" 5 #include "components/domain_reliability/google_configs.h"
6 6
7 #include "base/stl_util.h"
8 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
9 8
10 namespace domain_reliability { 9 namespace domain_reliability {
11 10
12 namespace { 11 namespace {
13 12
14 typedef std::vector<DomainReliabilityConfig*> ConfigPointerVector; 13 using ConfigPointerVector =
14 std::vector<std::unique_ptr<DomainReliabilityConfig>>;
15 15
16 TEST(DomainReliabilityGoogleConfigsTest, Enumerate) { 16 TEST(DomainReliabilityGoogleConfigsTest, Enumerate) {
17 ConfigPointerVector configs; 17 ConfigPointerVector configs;
18 base::STLElementDeleter<ConfigPointerVector> configs_deleter(&configs);
19 18
20 GetAllGoogleConfigs(&configs); 19 GetAllGoogleConfigs(&configs);
21 } 20 }
22 21
23 TEST(DomainReliabilityGoogleConfigsTest, ConfigsAreValid) { 22 TEST(DomainReliabilityGoogleConfigsTest, ConfigsAreValid) {
24 ConfigPointerVector configs; 23 ConfigPointerVector configs;
25 base::STLElementDeleter<ConfigPointerVector> configs_deleter(&configs);
26 24
27 GetAllGoogleConfigs(&configs); 25 GetAllGoogleConfigs(&configs);
28 for (auto* config : configs) 26 for (auto& config : configs)
29 EXPECT_TRUE(config->IsValid()); 27 EXPECT_TRUE(config->IsValid());
30 } 28 }
31 29
32 } // namespace 30 } // namespace
33 31
34 } // namespace domain_reliability 32 } // namespace domain_reliability
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698