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

Unified Diff: chrome/browser/about_flags_unittest.cc

Issue 2345033002: Log base::Features in Launch.FlagsAtStartup (Closed)
Patch Set: Fix up comment Created 4 years, 3 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
Index: chrome/browser/about_flags_unittest.cc
diff --git a/chrome/browser/about_flags_unittest.cc b/chrome/browser/about_flags_unittest.cc
index 3863e6c10375b3d75434c5afdcfb4c7de3ba77a0..d0694a3119ef8b2cd7c035797750b615739a2ad0 100644
--- a/chrome/browser/about_flags_unittest.cc
+++ b/chrome/browser/about_flags_unittest.cc
@@ -168,9 +168,7 @@ std::string FilePathStringTypeToString(const base::FilePath::StringType& path) {
}
// Get all associated switches corresponding to defined about_flags.cc entries.
-// Does not include information about FEATURE_VALUE or
-// FEATURE_WITH_VARIATIOSN_VALUE entries.
-std::set<std::string> GetAllSwitchesForTesting() {
+std::set<std::string> GetAllSwitchesAndFeaturesForTesting() {
std::set<std::string> result;
size_t num_entries = 0;
@@ -195,6 +193,8 @@ std::set<std::string> GetAllSwitchesForTesting() {
break;
case flags_ui::FeatureEntry::FEATURE_VALUE:
case flags_ui::FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE:
+ result.insert(std::string(entry.feature->name) + ":enabled");
+ result.insert(std::string(entry.feature->name) + ":disabled");
break;
}
}
@@ -283,8 +283,8 @@ TEST_F(AboutFlagsHistogramTest, CheckHistograms) {
}
// Check that all flags in about_flags.cc have entries in login_custom_flags.
- std::set<std::string> all_switches = GetAllSwitchesForTesting();
- for (const std::string& flag : all_switches) {
+ std::set<std::string> all_flags = GetAllSwitchesAndFeaturesForTesting();
+ for (const std::string& flag : all_flags) {
// Skip empty placeholders.
if (flag.empty())
continue;

Powered by Google App Engine
This is Rietveld 408576698