chromium/components/feature_engagement/internal/editable_configuration_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/feature_engagement/internal/editable_configuration.h"

#include <string>

#include "base/feature_list.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/feature_engagement/public/configuration.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace feature_engagement {

namespace {

BASE_FEATURE();
BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

class EditableConfigurationTest : public ::testing::Test {};

}  // namespace

TEST_F(EditableConfigurationTest, SingleConfigAddAndGet) {}

TEST_F(EditableConfigurationTest, TwoConfigAddAndGet) {}

TEST_F(EditableConfigurationTest, ConfigShouldBeEditable) {}

TEST_F(EditableConfigurationTest, SingleGropuConfigAddAndGet) {}

TEST_F(EditableConfigurationTest, TwoGroupConfigAddAndGet) {}

TEST_F(EditableConfigurationTest, GroupConfigShouldBeEditable) {}

#if BUILDFLAG(IS_CHROMEOS_ASH)
TEST_F(EditableConfigurationTest, SinglePrefixAddAndGet) {
  const std::string foo_prefix = "FooEventPrefix";
  configuration_.AddAllowedEventPrefix(foo_prefix);
  const auto& foo_prefix_result =
      configuration_.GetRegisteredAllowedEventPrefixes();
  EXPECT_EQ(1u, foo_prefix_result.size());
  EXPECT_TRUE(foo_prefix_result.contains(foo_prefix));
}
#endif

}  // namespace feature_engagement