| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/flags_ui/flags_state.h" | 5 #include "components/flags_ui/flags_state.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 const base::Feature kTestFeature1{"FeatureName1", | 67 const base::Feature kTestFeature1{"FeatureName1", |
| 68 base::FEATURE_ENABLED_BY_DEFAULT}; | 68 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 69 const base::Feature kTestFeature2{"FeatureName2", | 69 const base::Feature kTestFeature2{"FeatureName2", |
| 70 base::FEATURE_ENABLED_BY_DEFAULT}; | 70 base::FEATURE_ENABLED_BY_DEFAULT}; |
| 71 | 71 |
| 72 const FeatureEntry::FeatureParam kTestVariationOther[] = { | 72 const FeatureEntry::FeatureParam kTestVariationOther[] = { |
| 73 {kTestParam, kTestParamValue}}; | 73 {kTestParam, kTestParamValue}}; |
| 74 | 74 |
| 75 const FeatureEntry::FeatureVariation kTestVariations[] = { | 75 const FeatureEntry::FeatureVariation kTestVariations[] = { |
| 76 {"dummy description", kTestVariationOther, 1}}; | 76 {"dummy description", kTestVariationOther, 1, nullptr}}; |
| 77 | 77 |
| 78 // Those have to be valid ids for the translation system but the value are | 78 // Those have to be valid ids for the translation system but the value are |
| 79 // never used, so pick one at random from the current component. | 79 // never used, so pick one at random from the current component. |
| 80 const int kDummyNameId = IDS_FLAGS_UI_WARNING_HEADER; | 80 const int kDummyNameId = IDS_FLAGS_UI_WARNING_HEADER; |
| 81 const int kDummyDescriptionId = IDS_FLAGS_UI_WARNING_TEXT; | 81 const int kDummyDescriptionId = IDS_FLAGS_UI_WARNING_TEXT; |
| 82 | 82 |
| 83 bool SkipFeatureEntry(const FeatureEntry& feature_entry) { | 83 bool SkipFeatureEntry(const FeatureEntry& feature_entry) { |
| 84 return false; | 84 return false; |
| 85 } | 85 } |
| 86 | 86 |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 &supported_entries, &unsupported_entries, | 780 &supported_entries, &unsupported_entries, |
| 781 base::Bind(&SkipFeatureEntry)); | 781 base::Bind(&SkipFeatureEntry)); |
| 782 // All |kEntries| except for |kFlags3| should be supported. | 782 // All |kEntries| except for |kFlags3| should be supported. |
| 783 EXPECT_EQ(7u, supported_entries.GetSize()); | 783 EXPECT_EQ(7u, supported_entries.GetSize()); |
| 784 EXPECT_EQ(1u, unsupported_entries.GetSize()); | 784 EXPECT_EQ(1u, unsupported_entries.GetSize()); |
| 785 EXPECT_EQ(arraysize(kEntries), | 785 EXPECT_EQ(arraysize(kEntries), |
| 786 supported_entries.GetSize() + unsupported_entries.GetSize()); | 786 supported_entries.GetSize() + unsupported_entries.GetSize()); |
| 787 } | 787 } |
| 788 | 788 |
| 789 } // namespace flags_ui | 789 } // namespace flags_ui |
| OLD | NEW |