OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "base/strings/string_util.h" | 5 #include "base/strings/string_util.h" |
6 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | 6 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
7 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 7 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
8 #include "chrome/test/base/testing_profile.h" | 8 #include "chrome/test/base/testing_profile.h" |
9 #include "components/omnibox/browser/autocomplete_controller.h" | 9 #include "components/omnibox/browser/autocomplete_controller.h" |
10 #include "components/omnibox/browser/autocomplete_provider.h" | 10 #include "components/omnibox/browser/autocomplete_provider.h" |
11 #include "components/omnibox/browser/omnibox_client.h" | 11 #include "components/omnibox/browser/omnibox_client.h" |
12 #include "components/omnibox/browser/omnibox_controller.h" | 12 #include "components/omnibox/browser/omnibox_controller.h" |
13 #include "components/sessions/session_id.h" | 13 #include "components/sessions/core/session_id.h" |
14 #include "content/public/test/test_browser_thread_bundle.h" | 14 #include "content/public/test/test_browser_thread_bundle.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 class TestOmniboxClient : public OmniboxClient { | 18 class TestOmniboxClient : public OmniboxClient { |
19 public: | 19 public: |
20 explicit TestOmniboxClient(Profile* profile) | 20 explicit TestOmniboxClient(Profile* profile) |
21 : profile_(profile), | 21 : profile_(profile), |
22 scheme_classifier_(profile) {} | 22 scheme_classifier_(profile) {} |
23 ~TestOmniboxClient() override {} | 23 ~TestOmniboxClient() override {} |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // Ensure we have at least one provider. | 169 // Ensure we have at least one provider. |
170 ASSERT_NE(0, observed_providers); | 170 ASSERT_NE(0, observed_providers); |
171 | 171 |
172 // Ensure instant extended includes all the provides in classic Chrome. | 172 // Ensure instant extended includes all the provides in classic Chrome. |
173 int providers_with_instant_extended = observed_providers; | 173 int providers_with_instant_extended = observed_providers; |
174 // TODO(beaudoin): remove TYPE_SEARCH once it's no longer needed to pass | 174 // TODO(beaudoin): remove TYPE_SEARCH once it's no longer needed to pass |
175 // the Instant suggestion through via FinalizeInstantQuery. | 175 // the Instant suggestion through via FinalizeInstantQuery. |
176 CreateController(); | 176 CreateController(); |
177 AssertProviders(providers_with_instant_extended); | 177 AssertProviders(providers_with_instant_extended); |
178 } | 178 } |
OLD | NEW |