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

Side by Side Diff: chromeos/settings/timezone_settings_unittest.cc

Issue 2229383003: chromeos: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « chromeos/settings/timezone_settings.cc ('k') | chromeos/system/name_value_pairs_parser.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 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 <memory> 5 #include <memory>
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chromeos/settings/timezone_settings_helper.h" 8 #include "chromeos/settings/timezone_settings_helper.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "third_party/icu/source/common/unicode/unistr.h" 10 #include "third_party/icu/source/common/unicode/unistr.h"
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 KnownTimeZoneTest() {} 34 KnownTimeZoneTest() {}
35 ~KnownTimeZoneTest() override {} 35 ~KnownTimeZoneTest() override {}
36 36
37 void SetUp() override { 37 void SetUp() override {
38 for (const char* id : kTimeZones) { 38 for (const char* id : kTimeZones) {
39 timezones_.push_back(TimeZone::createTimeZone(UnicodeString(id))); 39 timezones_.push_back(TimeZone::createTimeZone(UnicodeString(id)));
40 } 40 }
41 } 41 }
42 42
43 void TearDown() override { STLDeleteElements(&timezones_); } 43 void TearDown() override { base::STLDeleteElements(&timezones_); }
44 44
45 protected: 45 protected:
46 std::vector<TimeZone*> timezones_; 46 std::vector<TimeZone*> timezones_;
47 }; 47 };
48 48
49 TEST_F(KnownTimeZoneTest, IdMatch) { 49 TEST_F(KnownTimeZoneTest, IdMatch) {
50 static struct { 50 static struct {
51 const char* id; 51 const char* id;
52 const char* matched; 52 const char* matched;
53 } timezone_match_list[] = { 53 } timezone_match_list[] = {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 for (const char* id : no_match_list) { 97 for (const char* id : no_match_list) {
98 std::unique_ptr<TimeZone> input( 98 std::unique_ptr<TimeZone> input(
99 TimeZone::createTimeZone(UnicodeString(id))); 99 TimeZone::createTimeZone(UnicodeString(id)));
100 EXPECT_EQ(NULL, GetKnownTimezoneOrNull(*input, timezones_)) 100 EXPECT_EQ(NULL, GetKnownTimezoneOrNull(*input, timezones_))
101 << "input=" << id; 101 << "input=" << id;
102 } 102 }
103 } 103 }
104 104
105 } // namespace system 105 } // namespace system
106 } // namespace chromeos 106 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/settings/timezone_settings.cc ('k') | chromeos/system/name_value_pairs_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698