Lines Matching refs:trial

75   void OnFieldTrialGroupFinalized(const std::string& trial,  in OnFieldTrialGroupFinalized()  argument
77 trial_name_ = trial; in OnFieldTrialGroupFinalized()
173 scoped_refptr<FieldTrial> trial; in TEST_F() local
178 trial = CreateFieldTrial(name, 10, winner, &default_group_number); in TEST_F()
179 trial->AppendGroup(loser, 5); // 50% chance of not being chosen. in TEST_F()
181 } while (trial->group_ != FieldTrial::kNotFinalized); in TEST_F()
184 EXPECT_EQ(default_group_number, trial->group()); in TEST_F()
187 EXPECT_EQ(winner, trial->group_name()); in TEST_F()
202 scoped_refptr<FieldTrial> trial = in TEST_F() local
204 trial->AppendGroup("first", 1); // 50% chance of being chosen. in TEST_F()
206 if (trial->group_ != FieldTrial::kNotFinalized) { in TEST_F()
210 trial->AppendGroup("second", 1); // Always chosen at this point. in TEST_F()
211 EXPECT_NE(FieldTrial::kNotFinalized, trial->group()); in TEST_F()
227 scoped_refptr<FieldTrial> trial = in TEST_F() local
229 int might_win = trial->AppendGroup("MightWin", 5); in TEST_F()
231 if (trial->group() == might_win) { in TEST_F()
251 scoped_refptr<FieldTrial> trial = in TEST_F() local
257 int might_win = trial->AppendGroup(std::string(), 1); in TEST_F()
261 if (trial->group_ == might_win) { in TEST_F()
265 EXPECT_EQ(winner_name, trial->group_name()); in TEST_F()
271 EXPECT_NE(trial->group(), default_group_number); in TEST_F()
272 EXPECT_EQ(trial->group(), winner_index); in TEST_F()
273 EXPECT_EQ(trial->group_name(), winner_name); in TEST_F()
283 FieldTrial* trial = FieldTrialList::FactoryGetFieldTrial( in TEST_F() local
287 trial->AppendGroup(loser, 999999999); // 99.9999999% chance of being chosen. in TEST_F()
290 EXPECT_EQ(default_group_number, trial->group()); in TEST_F()
293 EXPECT_EQ(default_group_name, trial->group_name()); in TEST_F()
298 scoped_refptr<FieldTrial> trial = in TEST_F() local
303 EXPECT_FALSE(trial->GetActiveGroup(&active_group)); in TEST_F()
307 trial = CreateFieldTrial(one_winner, 10, "Default", nullptr); in TEST_F()
309 trial->AppendGroup(winner, 10); in TEST_F()
310 EXPECT_FALSE(trial->GetActiveGroup(&active_group)); in TEST_F()
312 trial->group(); in TEST_F()
313 EXPECT_TRUE(trial->GetActiveGroup(&active_group)); in TEST_F()
361 scoped_refptr<FieldTrial> trial = in TEST_F() local
363 const int secondary_group = trial->AppendGroup(kSecondaryGroupName, 50); in TEST_F()
367 EXPECT_FALSE(trial->GetActiveGroup(&active_group)); in TEST_F()
375 const int chosen_group = trial->group(); in TEST_F()
378 EXPECT_TRUE(trial->GetActiveGroup(&active_group)); in TEST_F()
396 scoped_refptr<FieldTrial> trial = in TEST_F() local
398 trial->AppendGroup(kSecondaryGroupName, 50); in TEST_F()
404 std::string group_name = trial->GetGroupNameWithoutActivation(); in TEST_F()
409 EXPECT_EQ(group_name, trial->group_name()); in TEST_F()
416 scoped_refptr<FieldTrial> trial = in TEST_F() local
420 EXPECT_EQ("", trial->group_name_internal()); in TEST_F()
426 trial->AppendGroup("Winner", 10); in TEST_F()
428 trial->group(); in TEST_F()
458 scoped_refptr<FieldTrial> trial = in TEST_F() local
460 EXPECT_EQ("", trial->group_name_internal()); in TEST_F()
464 EXPECT_EQ("Default some name", trial->group_name_internal()); in TEST_F()
468 trial = CreateFieldTrial("trial2", 10, "Default some name", nullptr); in TEST_F()
469 trial->AppendGroup("Winner", 10); in TEST_F()
471 trial->group(); in TEST_F()
525 FieldTrial* trial = FieldTrialList::Find("Some_name"); in TEST_F() local
526 ASSERT_NE(static_cast<FieldTrial*>(nullptr), trial); in TEST_F()
527 EXPECT_EQ("Winner", trial->group_name()); in TEST_F()
528 EXPECT_EQ("Some_name", trial->trial_name()); in TEST_F()
530 trial = FieldTrialList::Find("xxx"); in TEST_F()
531 ASSERT_NE(static_cast<FieldTrial*>(nullptr), trial); in TEST_F()
532 EXPECT_EQ("yyyy", trial->group_name()); in TEST_F()
533 EXPECT_EQ("xxx", trial->trial_name()); in TEST_F()
540 FieldTrial* trial = FieldTrialList::Find("tname"); in TEST_F() local
541 ASSERT_NE(static_cast<FieldTrial*>(nullptr), trial); in TEST_F()
542 EXPECT_EQ("gname", trial->group_name()); in TEST_F()
543 EXPECT_EQ("tname", trial->trial_name()); in TEST_F()
560 scoped_refptr<FieldTrial> trial = in TEST_F() local
562 trial->AppendGroup("Winner", 10); in TEST_F()
564 trial->group(); in TEST_F()
664 FieldTrial* trial = FieldTrialList::Find("Foo"); in TEST_F() local
665 ASSERT_NE(static_cast<FieldTrial*>(nullptr), trial); in TEST_F()
666 EXPECT_EQ("Foo", trial->trial_name()); in TEST_F()
667 EXPECT_EQ("Foo_name", trial->group_name()); in TEST_F()
669 trial = FieldTrialList::Find("Bar"); in TEST_F()
670 ASSERT_NE(static_cast<FieldTrial*>(nullptr), trial); in TEST_F()
671 EXPECT_EQ("Bar", trial->trial_name()); in TEST_F()
672 EXPECT_EQ("Bar_name", trial->group_name()); in TEST_F()
680 FieldTrial* trial = FieldTrialList::Find("Some_name"); in TEST_F() local
681 ASSERT_NE(static_cast<FieldTrial*>(nullptr), trial); in TEST_F()
682 EXPECT_EQ("Winner", trial->group_name()); in TEST_F()
683 EXPECT_EQ("Some_name", trial->trial_name()); in TEST_F()
698 scoped_refptr<FieldTrial> trial = in TEST_F() local
700 trial->AppendGroup("Winner", 10); in TEST_F()
713 scoped_refptr<FieldTrial> trial = in TEST_F() local
715 trial->Disable(); in TEST_F()
716 ASSERT_EQ("default", trial->group_name()); in TEST_F()
717 ASSERT_EQ(default_group_number, trial->group()); in TEST_F()
721 scoped_refptr<FieldTrial> trial = in TEST_F() local
723 trial->AppendGroup("non_default", 100); in TEST_F()
724 trial->Disable(); in TEST_F()
725 ASSERT_EQ("default", trial->group_name()); in TEST_F()
808 scoped_refptr<FieldTrial> trial = in TEST_F() local
810 trial->SetForced(); in TEST_F()
812 trial = CreateFieldTrial(kTrialName, 100, kDefaultGroupName, nullptr); in TEST_F()
813 EXPECT_EQ(default_group, trial->group()); in TEST_F()
814 EXPECT_EQ(kDefaultGroupName, trial->group_name()); in TEST_F()
822 scoped_refptr<FieldTrial> trial = in TEST_F() local
824 trial->SetForced(); in TEST_F()
826 trial = CreateFieldTrial(kTrialName, 100, kDefaultGroupName, nullptr); in TEST_F()
827 const int extra_group = trial->AppendGroup("Extra", 100); in TEST_F()
828 EXPECT_EQ(default_group, trial->group()); in TEST_F()
829 EXPECT_NE(extra_group, trial->group()); in TEST_F()
830 EXPECT_EQ(kDefaultGroupName, trial->group_name()); in TEST_F()
937 scoped_refptr<FieldTrial> trial = in TEST_F() local
939 const int secondary_group = trial->AppendGroup(kSecondaryGroupName, 50); in TEST_F()
940 const int chosen_group = trial->group(); in TEST_F()
961 scoped_refptr<FieldTrial> trial = in TEST_F() local
963 const int secondary_group = trial->AppendGroup(kSecondaryGroupName, 50); in TEST_F()
964 const int chosen_group = trial->group(); in TEST_F()
980 scoped_refptr<FieldTrial> trial = in TEST_F() local
982 trial->AppendGroup("A", 25); in TEST_F()
983 trial->AppendGroup("B", 25); in TEST_F()
984 trial->AppendGroup("C", 25); in TEST_F()
985 trial->Disable(); in TEST_F()
993 EXPECT_EQ(default_group, trial->group()); in TEST_F()
1004 scoped_refptr<FieldTrial> trial = in TEST_F() local
1006 trial->AppendGroup("A", 25); in TEST_F()
1007 trial->AppendGroup("B", 25); in TEST_F()
1008 trial->AppendGroup("C", 25); in TEST_F()
1009 trial->SetForced(); in TEST_F()
1010 trial->Disable(); in TEST_F()
1018 EXPECT_EQ(default_group, trial->group()); in TEST_F()
1028 scoped_refptr<FieldTrial> trial = in TEST_F() local
1030 trial->AppendGroup("X", 50); in TEST_F()
1031 trial->Disable(); in TEST_F()
1050 scoped_refptr<FieldTrial> trial = in TEST_F() local
1052 trial->AppendGroup(kGroupName, kProbability); in TEST_F()
1053 EXPECT_EQ(kGroupName, trial->group_name()); in TEST_F()
1063 scoped_refptr<FieldTrial> trial( in TEST_F() local
1066 trial->AppendGroup(IntToString(j), 1); in TEST_F()
1068 EXPECT_EQ(IntToString(i), trial->group_name()); in TEST_F()
1076 scoped_refptr<FieldTrial> trial( in TEST_F() local
1078 trial->AppendGroup("1", 1); in TEST_F()
1079 trial->AppendGroup("2", 1); in TEST_F()
1081 EXPECT_EQ("2", trial->group_name()); in TEST_F()
1100 scoped_refptr<FieldTrial> trial( in TEST_F() local
1103 trial->AppendGroup("A", 80); in TEST_F()
1104 trial->AppendGroup("B", 10); in TEST_F()
1105 EXPECT_EQ(test_cases[i].expected_group, trial->group_name()); in TEST_F()
1134 scoped_refptr<FieldTrial> trial = in TEST() local
1136 trial->AppendGroup("cba", 10); in TEST()
1137 trial->group(); in TEST()
1191 FieldTrial* trial = FieldTrialList::CreateFieldTrial("Trial1", "Group1"); in TEST() local
1193 "MyFeature", FeatureList::OVERRIDE_ENABLE_FEATURE, trial); in TEST()
1347 FieldTrial* trial = in TEST() local
1358 FieldTrial::FieldTrialRef old_ref = trial->ref_; in TEST()
1360 FieldTrial::FieldTrialRef new_ref = trial->ref_; in TEST()