| 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/omnibox/browser/omnibox_field_trial.h" | 5 #include "components/omnibox/browser/omnibox_field_trial.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 "rule1", OmniboxEventProto::NTP); // exact match | 356 "rule1", OmniboxEventProto::NTP); // exact match |
| 357 ExpectRuleValue("rule1-1-0-value", | 357 ExpectRuleValue("rule1-1-0-value", |
| 358 "rule1", OmniboxEventProto::NTP); // exact match | 358 "rule1", OmniboxEventProto::NTP); // exact match |
| 359 ExpectRuleValue("rule1-*-*-value", | 359 ExpectRuleValue("rule1-*-*-value", |
| 360 "rule1", OmniboxEventProto::BLANK); // fallback to global | 360 "rule1", OmniboxEventProto::BLANK); // fallback to global |
| 361 ExpectRuleValue("rule1-3-0-value", | 361 ExpectRuleValue("rule1-3-0-value", |
| 362 "rule1", | 362 "rule1", |
| 363 OmniboxEventProto::HOME_PAGE); // exact match | 363 OmniboxEventProto::HOME_PAGE); // exact match |
| 364 ExpectRuleValue("rule1-4-*-value", | 364 ExpectRuleValue("rule1-4-*-value", |
| 365 "rule1", OmniboxEventProto::OTHER); // partial fallback | 365 "rule1", OmniboxEventProto::OTHER); // partial fallback |
| 366 ExpectRuleValue("rule1-*-*-value", | |
| 367 "rule1", | |
| 368 OmniboxEventProto:: // fallback to global | |
| 369 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT); | |
| 370 // Tests for rule 2. | 366 // Tests for rule 2. |
| 371 ExpectRuleValue("rule2-*-0-value", | 367 ExpectRuleValue("rule2-*-0-value", |
| 372 "rule2", | 368 "rule2", |
| 373 OmniboxEventProto::HOME_PAGE); // partial fallback | 369 OmniboxEventProto::HOME_PAGE); // partial fallback |
| 374 ExpectRuleValue("rule2-*-0-value", | 370 ExpectRuleValue("rule2-*-0-value", |
| 375 "rule2", OmniboxEventProto::OTHER); // partial fallback | 371 "rule2", OmniboxEventProto::OTHER); // partial fallback |
| 376 | 372 |
| 377 // Tests for rule 3. | 373 // Tests for rule 3. |
| 378 ExpectRuleValue("rule3-*-*-value", | 374 ExpectRuleValue("rule3-*-*-value", |
| 379 "rule3", | 375 "rule3", |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 NULL, NULL, false, | 505 NULL, NULL, false, |
| 510 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); | 506 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); |
| 511 | 507 |
| 512 // Valid params. | 508 // Valid params. |
| 513 VerifySuggestPollingStrategy("true", "50", true, 50); | 509 VerifySuggestPollingStrategy("true", "50", true, 50); |
| 514 VerifySuggestPollingStrategy(NULL, "35", false, 35); | 510 VerifySuggestPollingStrategy(NULL, "35", false, 35); |
| 515 VerifySuggestPollingStrategy( | 511 VerifySuggestPollingStrategy( |
| 516 "true", NULL, true, | 512 "true", NULL, true, |
| 517 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); | 513 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); |
| 518 } | 514 } |
| OLD | NEW |