OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/metrics/field_trial.h" | 5 #include "base/metrics/field_trial.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/build_time.h" | 9 #include "base/build_time.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 EXPECT_TRUE(field_trial_list.TrialExists("zzz")); | 1121 EXPECT_TRUE(field_trial_list.TrialExists("zzz")); |
1122 } | 1122 } |
1123 | 1123 |
1124 TEST(FieldTrialDeathTest, OneTimeRandomizedTrialWithoutFieldTrialList) { | 1124 TEST(FieldTrialDeathTest, OneTimeRandomizedTrialWithoutFieldTrialList) { |
1125 // Trying to instantiate a one-time randomized field trial before the | 1125 // Trying to instantiate a one-time randomized field trial before the |
1126 // FieldTrialList is created should crash. | 1126 // FieldTrialList is created should crash. |
1127 EXPECT_DCHECK_DEATH( | 1127 EXPECT_DCHECK_DEATH( |
1128 FieldTrialList::FactoryGetFieldTrial( | 1128 FieldTrialList::FactoryGetFieldTrial( |
1129 "OneTimeRandomizedTrialWithoutFieldTrialList", 100, kDefaultGroupName, | 1129 "OneTimeRandomizedTrialWithoutFieldTrialList", 100, kDefaultGroupName, |
1130 base::FieldTrialList::kNoExpirationYear, 1, 1, | 1130 base::FieldTrialList::kNoExpirationYear, 1, 1, |
1131 base::FieldTrial::ONE_TIME_RANDOMIZED, NULL), | 1131 base::FieldTrial::ONE_TIME_RANDOMIZED, NULL)); |
1132 ""); | |
1133 } | 1132 } |
1134 | 1133 |
1135 } // namespace base | 1134 } // namespace base |
OLD | NEW |