| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/previews/core/previews_experiments.h" | 5 #include "components/previews/core/previews_experiments.h" |
| 6 | 6 |
| 7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 using PreviewsExperimentsTest = testing::Test; | 12 using PreviewsExperimentsTest = testing::Test; |
| 13 | 13 |
| 14 } // namespace | 14 } // namespace |
| 15 | 15 |
| 16 namespace previews { | 16 namespace previews { |
| 17 | 17 |
| 18 TEST_F(PreviewsExperimentsTest, TestFieldTrialOfflinePage) { | 18 TEST_F(PreviewsExperimentsTest, TestFieldTrialOfflinePage) { |
| 19 EXPECT_FALSE(IsIncludedInClientSidePreviewsExperimentsFieldTrial()); | 19 EXPECT_FALSE(IsIncludedInClientSidePreviewsExperimentsFieldTrial()); |
| 20 EXPECT_FALSE(IsOfflinePreviewsEnabled()); | 20 EXPECT_FALSE(IsPreviewsTypeEnabled(PreviewsType::OFFLINE)); |
| 21 | 21 |
| 22 base::FieldTrialList field_trial_list(nullptr); | 22 base::FieldTrialList field_trial_list(nullptr); |
| 23 ASSERT_TRUE(EnableOfflinePreviewsForTesting()); | 23 ASSERT_TRUE(EnableOfflinePreviewsForTesting()); |
| 24 | 24 |
| 25 EXPECT_TRUE(IsIncludedInClientSidePreviewsExperimentsFieldTrial()); | 25 EXPECT_TRUE(IsIncludedInClientSidePreviewsExperimentsFieldTrial()); |
| 26 EXPECT_TRUE(IsOfflinePreviewsEnabled()); | 26 EXPECT_TRUE(IsPreviewsTypeEnabled(PreviewsType::OFFLINE)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace previews | 29 } // namespace previews |
| OLD | NEW |