| 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 "chrome/common/variations/variations_util.h" | 5 #include "chrome/common/variations/variations_util.h" |
| 6 | 6 |
| 7 #include "base/feature_list.h" | 7 #include "base/feature_list.h" |
| 8 #include "base/macros.h" |
| 8 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 9 #include "chrome/common/variations/fieldtrial_testing_config.h" | 10 #include "chrome/common/variations/fieldtrial_testing_config.h" |
| 10 #include "components/variations/variations_associated_data.h" | 11 #include "components/variations/variations_associated_data.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 13 |
| 13 namespace chrome_variations { | 14 namespace chrome_variations { |
| 14 | 15 |
| 15 class VariationsUtilTest : public ::testing::Test { | 16 class VariationsUtilTest : public ::testing::Test { |
| 16 public: | 17 public: |
| 17 VariationsUtilTest() : field_trial_list_(NULL) {} | 18 VariationsUtilTest() : field_trial_list_(NULL) {} |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 EXPECT_TRUE(base::FeatureList::IsEnabled(kFeatureB)); | 105 EXPECT_TRUE(base::FeatureList::IsEnabled(kFeatureB)); |
| 105 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy1")); | 106 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy1")); |
| 106 | 107 |
| 107 EXPECT_FALSE(base::FieldTrialList::IsTrialActive("TestStudy2")); | 108 EXPECT_FALSE(base::FieldTrialList::IsTrialActive("TestStudy2")); |
| 108 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureC)); | 109 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureC)); |
| 109 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureD)); | 110 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureD)); |
| 110 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy2")); | 111 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy2")); |
| 111 } | 112 } |
| 112 | 113 |
| 113 } // namespace chrome_variations | 114 } // namespace chrome_variations |
| OLD | NEW |