Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(685)

Unified Diff: chrome/browser/omnibox/omnibox_field_trial_unittest.cc

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/omnibox/omnibox_field_trial_unittest.cc
diff --git a/chrome/browser/omnibox/omnibox_field_trial_unittest.cc b/chrome/browser/omnibox/omnibox_field_trial_unittest.cc
index 22a53879324a86aff138acbffc40deee465ee8f9..9439bd2bd9871d81b9226a64956b111ecdd10c99 100644
--- a/chrome/browser/omnibox/omnibox_field_trial_unittest.cc
+++ b/chrome/browser/omnibox/omnibox_field_trial_unittest.cc
@@ -160,21 +160,18 @@ TEST_F(OmniboxFieldTrialTest, ZeroSuggestFieldTrial) {
}
TEST_F(OmniboxFieldTrialTest, GetDemotionsByTypeWithFallback) {
- // Must be the same as kBundledExperimentFieldTrialName
- // defined in omnibox_field_trial.cc.
- const std::string kTrialName = "OmniboxBundledExperimentV1";
- // Must be the same as kDemoteByTypeRule defined in
- // omnibox_field_trial.cc.
- const std::string kRuleName = "DemoteByType";
{
std::map<std::string, std::string> params;
- params[kRuleName + ":1:*"] = "1:50,2:0";
- params[kRuleName + ":3:*"] = "5:100";
- params[kRuleName + ":*:*"] = "1:25";
+ params[std::string(OmniboxFieldTrial::kDemoteByTypeRule) + ":1:*"] =
+ "1:50,2:0";
+ params[std::string(OmniboxFieldTrial::kDemoteByTypeRule) + ":3:*"] =
+ "5:100";
+ params[std::string(OmniboxFieldTrial::kDemoteByTypeRule) + ":*:*"] = "1:25";
ASSERT_TRUE(chrome_variations::AssociateVariationParams(
- kTrialName, "A", params));
+ OmniboxFieldTrial::kBundledExperimentFieldTrialName, "A", params));
}
- base::FieldTrialList::CreateFieldTrial(kTrialName, "A");
+ base::FieldTrialList::CreateFieldTrial(
+ OmniboxFieldTrial::kBundledExperimentFieldTrialName, "A");
OmniboxFieldTrial::DemotionMultipliers demotions_by_type;
OmniboxFieldTrial::GetDemotionsByType(
AutocompleteInput::NEW_TAB_PAGE, &demotions_by_type);
@@ -195,9 +192,6 @@ TEST_F(OmniboxFieldTrialTest, GetValueForRuleInContext) {
// This test starts with Instant Extended off (the default state), then
// enables Instant Extended and tests again on the same rules.
- // Must be the same as kBundledExperimentFieldTrialName
- // defined in omnibox_field_trial.cc.
- const std::string kTrialName = "OmniboxBundledExperimentV1";
{
std::map<std::string, std::string> params;
// Rule 1 has some exact matches and fallbacks at every level.
@@ -218,10 +212,11 @@ TEST_F(OmniboxFieldTrialTest, GetValueForRuleInContext) {
// Add a malformed rule to make sure it doesn't screw things up.
params["unrecognized"] = "unrecognized-value";
ASSERT_TRUE(chrome_variations::AssociateVariationParams(
- kTrialName, "A", params));
+ OmniboxFieldTrial::kBundledExperimentFieldTrialName, "A", params));
}
- base::FieldTrialList::CreateFieldTrial(kTrialName, "A");
+ base::FieldTrialList::CreateFieldTrial(
+ OmniboxFieldTrial::kBundledExperimentFieldTrialName, "A");
// Tests with Instant Extended disabled.
// Tests for rule 1.
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698