OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/domain_reliability/google_configs.h" |
| 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 |
| 9 namespace domain_reliability { |
| 10 |
| 11 namespace { |
| 12 |
| 13 TEST(DomainReliabilityGoogleConfigsTest, Enumerate) { |
| 14 GoogleConfigs configs = GoogleConfigs::GetAllConfigs(); |
| 15 scoped_ptr<DomainReliabilityConfig> config; |
| 16 |
| 17 while (configs.HasMoreConfigs()) { |
| 18 config = configs.GetNextConfig(); |
| 19 EXPECT_TRUE(config); |
| 20 } |
| 21 |
| 22 config = configs.GetNextConfig(); |
| 23 EXPECT_FALSE(config); |
| 24 |
| 25 EXPECT_FALSE(configs.HasMoreConfigs()); |
| 26 } |
| 27 |
| 28 TEST(DomainReliabilityGoogleConfigsTest, ConfigsAreValid) { |
| 29 GoogleConfigs configs = GoogleConfigs::GetAllConfigs(); |
| 30 while (configs.HasMoreConfigs()) |
| 31 EXPECT_TRUE(configs.GetNextConfig()->IsValid()); |
| 32 } |
| 33 |
| 34 } // namespace |
| 35 |
| 36 } // namespace domain_reliability |
OLD | NEW |