// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_FEATURE_ENGAGEMENT_TEST_SCOPED_IPH_FEATURE_LIST_H_ #define COMPONENTS_FEATURE_ENGAGEMENT_TEST_SCOPED_IPH_FEATURE_LIST_H_ #include <set> #include <vector> #include "base/auto_reset.h" #include "base/memory/raw_ptr.h" #include "base/test/scoped_feature_list.h" namespace feature_engagement::test { // Disallows all but a set of IPH features within this object's scope, // optionally without enabling or disabling any actual features, thus optionally // allowing the use of existing field trial configurations. // // Use to test the functionality of your feature engagement features in tests. // // Nested ScopedIphFeatureList objects are additive; you can create an empty // scope (using InitWithNoFeaturesAllowed()) and then create a nested scope that // enables a single IPH. // // USAGE NOTE: for browser-based tests, prefer using // `InteractiveFeaturePromoTest[T]` instead of directly using this class. class ScopedIphFeatureList { … }; } // namespace feature_engagement::test #endif // COMPONENTS_FEATURE_ENGAGEMENT_TEST_SCOPED_IPH_FEATURE_LIST_H_