Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: base/test/scoped_feature_list.h

Issue 2850073002: Revert of Change ScopedFeatureList to overrides FeatureList not reset (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/BUILD.gn ('k') | base/test/scoped_feature_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_feature_list.h
diff --git a/base/test/scoped_feature_list.h b/base/test/scoped_feature_list.h
index e1df6c6ad7050748d47882bfeecc5e577233d6a4..99e07f5374a96bf9668e9805da592cc9cd4e5805 100644
--- a/base/test/scoped_feature_list.h
+++ b/base/test/scoped_feature_list.h
@@ -22,42 +22,29 @@
ScopedFeatureList();
~ScopedFeatureList();
- // WARNING: This method will reset any globally configured features to their
- // default values, which can hide feature interaction bugs. Please use
- // sparingly. https://crbug.com/713390
// Initializes and registers a FeatureList instance with no overrides.
void Init();
- // WARNING: This method will reset any globally configured features to their
- // default values, which can hide feature interaction bugs. Please use
- // sparingly. https://crbug.com/713390
// Initializes and registers the given FeatureList instance.
void InitWithFeatureList(std::unique_ptr<FeatureList> feature_list);
- // WARNING: This method will reset any globally configured features to their
- // default values, which can hide feature interaction bugs. Please use
- // sparingly. https://crbug.com/713390
- // Initializes and registers a FeatureList instance with only the given
+ // Initializes and registers a FeatureList instance with the given enabled
+ // and disabled features.
+ void InitWithFeatures(
+ const std::initializer_list<base::Feature>& enabled_features,
+ const std::initializer_list<base::Feature>& disabled_features);
+
+ // Initializes and registers a FeatureList instance with the given
// enabled and disabled features (comma-separated names).
void InitFromCommandLine(const std::string& enable_features,
const std::string& disable_features);
- // Initializes and registers a FeatureList instance based on present
- // FeatureList and overridden with the given enabled and disabled features.
- // Any feature overrides already present in the global FeatureList will
- // continue to apply, unless they conflict with the overrides passed into this
- // method. This is important for testing potentially unexpected feature
- // interactions.
- void InitWithFeatures(
- const std::initializer_list<base::Feature>& enabled_features,
- const std::initializer_list<base::Feature>& disabled_features);
-
- // Initializes and registers a FeatureList instance based on present
- // FeatureList and overridden with single enabled feature.
+ // Initializes and registers a FeatureList instance enabling a single
+ // feature.
void InitAndEnableFeature(const base::Feature& feature);
- // Initializes and registers a FeatureList instance based on present
- // FeatureList and overridden with single disabled feature.
+ // Initializes and registers a FeatureList instance disabling a single
+ // feature.
void InitAndDisableFeature(const base::Feature& feature);
private:
« no previous file with comments | « base/BUILD.gn ('k') | base/test/scoped_feature_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698