| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/feature_list.h" | 9 #include "base/feature_list.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
| 12 #include "chrome/common/variations/fieldtrial_testing_config.h" | 13 #include "chrome/common/variations/fieldtrial_testing_config.h" |
| 13 #include "components/variations/variations_associated_data.h" | 14 #include "components/variations/variations_associated_data.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 16 |
| 16 namespace chrome_variations { | 17 namespace chrome_variations { |
| 17 | 18 |
| 18 class VariationsUtilTest : public ::testing::Test { | 19 class VariationsUtilTest : public ::testing::Test { |
| 19 public: | 20 public: |
| 20 VariationsUtilTest() : field_trial_list_(NULL) {} | 21 VariationsUtilTest() : field_trial_list_(NULL) {} |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 EXPECT_TRUE(base::FeatureList::IsEnabled(kFeatureB)); | 115 EXPECT_TRUE(base::FeatureList::IsEnabled(kFeatureB)); |
| 115 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy1")); | 116 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy1")); |
| 116 | 117 |
| 117 EXPECT_FALSE(base::FieldTrialList::IsTrialActive("TestStudy2")); | 118 EXPECT_FALSE(base::FieldTrialList::IsTrialActive("TestStudy2")); |
| 118 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureC)); | 119 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureC)); |
| 119 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureD)); | 120 EXPECT_FALSE(base::FeatureList::IsEnabled(kFeatureD)); |
| 120 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy2")); | 121 EXPECT_TRUE(base::FieldTrialList::IsTrialActive("TestStudy2")); |
| 121 } | 122 } |
| 122 | 123 |
| 123 } // namespace chrome_variations | 124 } // namespace chrome_variations |
| OLD | NEW |