1 // Copyright 2017 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/feature_engagement/internal/single_invalid_configuration.h"
6 
7 #include "base/feature_list.h"
8 #include "components/feature_engagement/public/configuration.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 
11 namespace feature_engagement {
12 
13 namespace {
14 
15 const base::Feature kSingleTestFeatureFoo{"test_foo",
16                                           base::FEATURE_DISABLED_BY_DEFAULT};
17 const base::Feature kSingleTestFeatureBar{"test_bar",
18                                           base::FEATURE_DISABLED_BY_DEFAULT};
19 
20 class SingleInvalidConfigurationTest : public ::testing::Test {
21  public:
22   SingleInvalidConfigurationTest() = default;
23 
24  protected:
25   SingleInvalidConfiguration configuration_;
26 
27  private:
28   DISALLOW_COPY_AND_ASSIGN(SingleInvalidConfigurationTest);
29 };
30 
31 }  // namespace
32 
TEST_F(SingleInvalidConfigurationTest,AllConfigurationsAreInvalid)33 TEST_F(SingleInvalidConfigurationTest, AllConfigurationsAreInvalid) {
34   FeatureConfig foo_config =
35       configuration_.GetFeatureConfig(kSingleTestFeatureFoo);
36   EXPECT_FALSE(foo_config.valid);
37 
38   FeatureConfig bar_config =
39       configuration_.GetFeatureConfig(kSingleTestFeatureBar);
40   EXPECT_FALSE(bar_config.valid);
41 }
42 
43 }  // namespace feature_engagement
44