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 "base/basictypes.h" | |
8 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/macros.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 "build/build_config.h" |
12 #include "components/metrics/proto/omnibox_event.pb.h" | 13 #include "components/metrics/proto/omnibox_event.pb.h" |
13 #include "components/search/search.h" | 14 #include "components/search/search.h" |
14 #include "components/variations/entropy_provider.h" | 15 #include "components/variations/entropy_provider.h" |
15 #include "components/variations/variations_associated_data.h" | 16 #include "components/variations/variations_associated_data.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 | 18 |
18 using metrics::OmniboxEventProto; | 19 using metrics::OmniboxEventProto; |
19 | 20 |
20 class OmniboxFieldTrialTest : public testing::Test { | 21 class OmniboxFieldTrialTest : public testing::Test { |
21 public: | 22 public: |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 NULL, NULL, false, | 515 NULL, NULL, false, |
515 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); | 516 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); |
516 | 517 |
517 // Valid params. | 518 // Valid params. |
518 VerifySuggestPollingStrategy("true", "50", true, 50); | 519 VerifySuggestPollingStrategy("true", "50", true, 50); |
519 VerifySuggestPollingStrategy(NULL, "35", false, 35); | 520 VerifySuggestPollingStrategy(NULL, "35", false, 35); |
520 VerifySuggestPollingStrategy( | 521 VerifySuggestPollingStrategy( |
521 "true", NULL, true, | 522 "true", NULL, true, |
522 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); | 523 OmniboxFieldTrial::kDefaultMinimumTimeBetweenSuggestQueriesMs); |
523 } | 524 } |
OLD | NEW |