Lines Matching refs:FeatureList
38 FeatureList::SplitFeatureListString(feature_list); in SortFeatureListString()
48 RegisterFeatureListInstance(WrapUnique(new FeatureList)); in FeatureListTest()
52 void RegisterFeatureListInstance(std::unique_ptr<FeatureList> feature_list) { in RegisterFeatureListInstance()
53 FeatureList::ClearInstanceForTesting(); in RegisterFeatureListInstance()
55 FeatureList::SetInstance(std::move(feature_list)); in RegisterFeatureListInstance()
58 FeatureList::ClearInstanceForTesting(); in ClearFeatureListInstance()
62 FeatureList* feature_list() { return feature_list_; } in feature_list()
66 FeatureList* feature_list_;
72 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
73 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
99 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
105 FeatureList::IsEnabled(kFeatureOnByDefault)) in TEST_F()
108 FeatureList::IsEnabled(kFeatureOffByDefault)) in TEST_F()
134 FeatureList::OverrideState trial1_state; in TEST_F()
135 FeatureList::OverrideState trial2_state; in TEST_F()
137 {FeatureList::OVERRIDE_DISABLE_FEATURE, in TEST_F()
138 FeatureList::OVERRIDE_DISABLE_FEATURE}, in TEST_F()
139 {FeatureList::OVERRIDE_DISABLE_FEATURE, in TEST_F()
140 FeatureList::OVERRIDE_ENABLE_FEATURE}, in TEST_F()
141 {FeatureList::OVERRIDE_ENABLE_FEATURE, in TEST_F()
142 FeatureList::OVERRIDE_DISABLE_FEATURE}, in TEST_F()
143 {FeatureList::OVERRIDE_ENABLE_FEATURE, in TEST_F()
144 FeatureList::OVERRIDE_ENABLE_FEATURE}, in TEST_F()
155 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
170 (test_case.trial1_state == FeatureList::OVERRIDE_ENABLE_FEATURE); in TEST_F()
171 EXPECT_EQ(expected_enabled_1, FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
177 (test_case.trial2_state == FeatureList::OVERRIDE_ENABLE_FEATURE); in TEST_F()
178 EXPECT_EQ(expected_enabled_2, FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
187 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
192 kFeatureOnByDefaultName, FeatureList::OVERRIDE_USE_DEFAULT, trial1); in TEST_F()
194 kFeatureOffByDefaultName, FeatureList::OVERRIDE_USE_DEFAULT, trial2); in TEST_F()
202 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
208 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
218 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
226 kFeatureOffByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE, trial); in TEST_F()
231 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
242 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
246 kFeatureOnByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)); in TEST_F()
248 kFeatureOnByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)); in TEST_F()
250 kFeatureOffByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)); in TEST_F()
252 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)); in TEST_F()
259 kFeatureOffByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)); in TEST_F()
261 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)); in TEST_F()
266 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE, in TEST_F()
269 kFeatureOffByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)); in TEST_F()
271 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)); in TEST_F()
276 kFeatureOnByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE, in TEST_F()
279 kFeatureOnByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)); in TEST_F()
281 kFeatureOnByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)); in TEST_F()
285 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
286 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
317 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
323 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)) { in TEST_F()
327 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE, in TEST_F()
332 kFeatureOffByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)) { in TEST_F()
336 kFeatureOffByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE, in TEST_F()
346 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
350 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
360 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
365 FeatureList::OVERRIDE_ENABLE_FEATURE, in TEST_F()
372 FeatureList::GetInstance()->GetFeatureOverrides(&enable_features, in TEST_F()
377 FeatureList::GetInstance()->GetCommandLineFeatureOverrides(&enable_features, in TEST_F()
386 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
391 kFeatureOffByDefaultName, FeatureList::OVERRIDE_USE_DEFAULT, trial); in TEST_F()
397 FeatureList::GetInstance()->GetFeatureOverrides(&enable_features, in TEST_F()
407 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
409 kFeatureOnByDefaultName, FeatureList::OVERRIDE_USE_DEFAULT, trial); in TEST_F()
412 EXPECT_EQ(trial, FeatureList::GetFieldTrial(kFeatureOnByDefault)); in TEST_F()
413 EXPECT_EQ(nullptr, FeatureList::GetFieldTrial(kFeatureOffByDefault)); in TEST_F()
420 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
425 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
434 std::unique_ptr<FeatureList> feature_list(new FeatureList); in TEST_F()
440 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
444 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
451 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); in TEST_F()
452 FeatureList::SetInstance(std::move(feature_list)); in TEST_F()
453 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
454 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
457 FeatureList::InitializeInstance("", kFeatureOnByDefaultName); in TEST_F()
458 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
459 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
462 FeatureList::InitializeInstance(kFeatureOffByDefaultName, ""); in TEST_F()
463 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
464 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
472 EXPECT_EQ(nullptr, FeatureList::GetInstance()); in TEST_F()
473 EXPECT_TRUE(FeatureList::IsEnabled(kFeatureOnByDefault)); in TEST_F()
474 EXPECT_EQ(nullptr, FeatureList::GetInstance()); in TEST_F()
475 EXPECT_FALSE(FeatureList::IsEnabled(kFeatureOffByDefault)); in TEST_F()
479 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); in TEST_F()
483 FeatureList::OVERRIDE_ENABLE_FEATURE, nullptr); in TEST_F()
485 kFeatureOnByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE, nullptr); in TEST_F()
494 std::unique_ptr<base::FeatureList> feature_list2(new base::FeatureList); in TEST_F()
498 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)); in TEST_F()
500 kFeatureOnByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)); in TEST_F()
505 kFeatureOffByDefaultName, FeatureList::OVERRIDE_ENABLE_FEATURE)); in TEST_F()
507 kFeatureOnByDefaultName, FeatureList::OVERRIDE_DISABLE_FEATURE)); in TEST_F()
512 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); in TEST_F()
518 kFeatureOnByDefaultName, FeatureList::OVERRIDE_USE_DEFAULT, trial1); in TEST_F()
520 kFeatureOffByDefaultName, FeatureList::OVERRIDE_USE_DEFAULT, trial2); in TEST_F()
529 std::unique_ptr<base::FeatureList> feature_list2(new base::FeatureList); in TEST_F()