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

Side by Side Diff: components/flags_ui/flags_state_unittest.cc

Issue 2182553002: Add other variations (with ids) for NTPSnippets to chrome://flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alexei's comment #5 + fix a bug Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « components/flags_ui/flags_state.cc ('k') | components/variations/variations_associated_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/flags_ui/flags_state.cc ('k') | components/variations/variations_associated_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698