| Index: components/domain_reliability/google_configs_unittest.cc
|
| diff --git a/components/domain_reliability/google_configs_unittest.cc b/components/domain_reliability/google_configs_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..261e80f4255695d1372b6cb967ffe04ba3388395
|
| --- /dev/null
|
| +++ b/components/domain_reliability/google_configs_unittest.cc
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/domain_reliability/google_configs.h"
|
| +
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace domain_reliability {
|
| +
|
| +namespace {
|
| +
|
| +TEST(DomainReliabilityGoogleConfigsTest, Enumerate) {
|
| + GoogleConfigs configs = GoogleConfigs::GetAllConfigs();
|
| + scoped_ptr<DomainReliabilityConfig> config;
|
| +
|
| + while (configs.HasMoreConfigs()) {
|
| + config = configs.GetNextConfig();
|
| + EXPECT_TRUE(config);
|
| + }
|
| +
|
| + config = configs.GetNextConfig();
|
| + EXPECT_FALSE(config);
|
| +
|
| + EXPECT_FALSE(configs.HasMoreConfigs());
|
| +}
|
| +
|
| +TEST(DomainReliabilityGoogleConfigsTest, ConfigsAreValid) {
|
| + GoogleConfigs configs = GoogleConfigs::GetAllConfigs();
|
| + while (configs.HasMoreConfigs())
|
| + EXPECT_TRUE(configs.GetNextConfig()->IsValid());
|
| +}
|
| +
|
| +} // namespace
|
| +
|
| +} // namespace domain_reliability
|
|
|