| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/omnibox/omnibox_field_trial.h" | 5 #include "chrome/browser/omnibox/omnibox_field_trial.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "chrome/browser/autocomplete/autocomplete_input.h" | 12 #include "chrome/browser/autocomplete/autocomplete_input.h" |
| 13 #include "chrome/browser/search/search.h" | 13 #include "chrome/browser/search/search.h" |
| 14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/metrics/entropy_provider.h" | |
| 16 #include "chrome/common/metrics/variations/variations_util.h" | 15 #include "chrome/common/metrics/variations/variations_util.h" |
| 16 #include "components/variations/entropy_provider.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 class OmniboxFieldTrialTest : public testing::Test { | 19 class OmniboxFieldTrialTest : public testing::Test { |
| 20 public: | 20 public: |
| 21 OmniboxFieldTrialTest() { | 21 OmniboxFieldTrialTest() { |
| 22 ResetFieldTrialList(); | 22 ResetFieldTrialList(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 void ResetFieldTrialList() { | 25 void ResetFieldTrialList() { |
| 26 // Destroy the existing FieldTrialList before creating a new one to avoid | 26 // Destroy the existing FieldTrialList before creating a new one to avoid |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 ExpectRuleValue("", | 292 ExpectRuleValue("", |
| 293 "rule4", AutocompleteInput::BLANK); // no global fallback | 293 "rule4", AutocompleteInput::BLANK); // no global fallback |
| 294 ExpectRuleValue("", | 294 ExpectRuleValue("", |
| 295 "rule4", AutocompleteInput::HOME_PAGE); // no global fallback | 295 "rule4", AutocompleteInput::HOME_PAGE); // no global fallback |
| 296 | 296 |
| 297 // Tests for rule 5 (a missing rule). | 297 // Tests for rule 5 (a missing rule). |
| 298 ExpectRuleValue("", | 298 ExpectRuleValue("", |
| 299 "rule5", AutocompleteInput::OTHER); // no rule at all | 299 "rule5", AutocompleteInput::OTHER); // no rule at all |
| 300 #endif // !defined(OS_IOS) && !defined(OS_ANDROID) | 300 #endif // !defined(OS_IOS) && !defined(OS_ANDROID) |
| 301 } | 301 } |
| OLD | NEW |