Chromium Code Reviews| 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..2d10c3be1f6b44a1917e30dcd0bc723ec58dfa6f 100644 |
| --- a/chrome/browser/about_flags_unittest.cc |
| +++ b/chrome/browser/about_flags_unittest.cc |
| @@ -168,9 +168,8 @@ 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() { |
| +// Does not include information about FEATURE_WITH_VARIATIONS_VALUE entries. |
| +std::set<std::string> GetAllSwitchesAndFeaturesForTesting() { |
| std::set<std::string> result; |
| size_t num_entries = 0; |
| @@ -194,6 +193,9 @@ std::set<std::string> GetAllSwitchesForTesting() { |
| result.insert(entry.disable_command_line_switch); |
| break; |
| case flags_ui::FeatureEntry::FEATURE_VALUE: |
| + result.insert(std::string(entry.feature->name) + ":enabled"); |
| + result.insert(std::string(entry.feature->name) + ":disabled"); |
| + break; |
| case flags_ui::FeatureEntry::FEATURE_WITH_VARIATIONS_VALUE: |
|
Alexei Svitkine (slow)
2016/09/16 20:50:33
I think it's fine to handle this same as the above
lawrencewu
2016/09/16 21:20:03
Done.
|
| break; |
| } |
| @@ -283,8 +285,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; |