Chromium Code Reviews| 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/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "chrome/browser/autocomplete/autocomplete_input.h" | |
|
Mark P
2013/08/09 23:27:15
This isn't needed for this change but I noticed it
| |
| 11 #include "chrome/common/metrics/entropy_provider.h" | 12 #include "chrome/common/metrics/entropy_provider.h" |
| 12 #include "chrome/common/metrics/variations/variations_util.h" | 13 #include "chrome/common/metrics/variations/variations_util.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 15 |
| 15 class OmniboxFieldTrialTest : public testing::Test { | 16 class OmniboxFieldTrialTest : public testing::Test { |
| 16 public: | 17 public: |
| 17 OmniboxFieldTrialTest() { | 18 OmniboxFieldTrialTest() { |
| 18 ResetFieldTrialList(); | 19 ResetFieldTrialList(); |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 233 "rule3-4-value", | 234 "rule3-4-value", |
| 234 OmniboxFieldTrial::GetValueForRuleInContext( | 235 OmniboxFieldTrial::GetValueForRuleInContext( |
| 235 "rule3", AutocompleteInput::OTHER)); // exact match | 236 "rule3", AutocompleteInput::OTHER)); // exact match |
| 236 | 237 |
| 237 // Tests for rule 4 (a missing rule). | 238 // Tests for rule 4 (a missing rule). |
| 238 EXPECT_EQ( | 239 EXPECT_EQ( |
| 239 "", | 240 "", |
| 240 OmniboxFieldTrial::GetValueForRuleInContext( | 241 OmniboxFieldTrial::GetValueForRuleInContext( |
| 241 "rule4", AutocompleteInput::OTHER)); // no rule at all | 242 "rule4", AutocompleteInput::OTHER)); // no rule at all |
| 242 } | 243 } |
| OLD | NEW |