| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/search/search.h" | 5 #include "components/search/search.h" |
| 6 | 6 |
| 7 #include "base/metrics/field_trial.h" | 7 #include "base/metrics/field_trial.h" |
| 8 #include "base/metrics/statistics_recorder.h" | 8 #include "base/metrics/statistics_recorder.h" |
| 9 #include "build/build_config.h" |
| 9 #include "components/variations/entropy_provider.h" | 10 #include "components/variations/entropy_provider.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 12 |
| 12 namespace search { | 13 namespace search { |
| 13 | 14 |
| 14 class EmbeddedSearchFieldTrialTest : public testing::Test { | 15 class EmbeddedSearchFieldTrialTest : public testing::Test { |
| 15 protected: | 16 protected: |
| 16 void SetUp() override { | 17 void SetUp() override { |
| 17 field_trial_list_.reset(new base::FieldTrialList( | 18 field_trial_list_.reset(new base::FieldTrialList( |
| 18 new metrics::SHA1EntropyProvider("42"))); | 19 new metrics::SHA1EntropyProvider("42"))); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 EnableQueryExtractionForTesting(); | 231 EnableQueryExtractionForTesting(); |
| 231 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( | 232 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( |
| 232 "EmbeddedSearch", "Group1 espv:2 query_extraction:0")); | 233 "EmbeddedSearch", "Group1 espv:2 query_extraction:0")); |
| 233 EXPECT_TRUE(IsInstantExtendedAPIEnabled()); | 234 EXPECT_TRUE(IsInstantExtendedAPIEnabled()); |
| 234 EXPECT_TRUE(IsQueryExtractionEnabled()); | 235 EXPECT_TRUE(IsQueryExtractionEnabled()); |
| 235 EXPECT_EQ(2ul, EmbeddedSearchPageVersion()); | 236 EXPECT_EQ(2ul, EmbeddedSearchPageVersion()); |
| 236 } | 237 } |
| 237 #endif // !defined(OS_IOS) && !defined(OS_ANDROID) | 238 #endif // !defined(OS_IOS) && !defined(OS_ANDROID) |
| 238 | 239 |
| 239 } // namespace search | 240 } // namespace search |
| OLD | NEW |