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

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_controller_unittest.cc

Issue 15003002: Omnibox refactor. Move StartAutocomplete and DoInstant to controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Answered Sreeram's comments. Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "chrome/browser/autocomplete/autocomplete_controller.h" 6 #include "chrome/browser/autocomplete/autocomplete_controller.h"
7 #include "chrome/browser/autocomplete/autocomplete_provider.h" 7 #include "chrome/browser/autocomplete/autocomplete_provider.h"
8 #include "chrome/browser/search/search.h" 8 #include "chrome/browser/search/search.h"
9 #include "chrome/browser/ui/omnibox/omnibox_controller.h" 9 #include "chrome/browser/ui/omnibox/omnibox_controller.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "chrome/test/base/testing_profile.h" 11 #include "chrome/test/base/testing_profile.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace {
15
16 class OmniboxControllerTest : public testing::Test { 14 class OmniboxControllerTest : public testing::Test {
17 protected: 15 protected:
18 OmniboxControllerTest(); 16 OmniboxControllerTest();
19 virtual ~OmniboxControllerTest(); 17 virtual ~OmniboxControllerTest();
20 18
21 void CreateController(); 19 void CreateController();
22 void AssertProviders(int expected_providers); 20 void AssertProviders(int expected_providers);
23 21
24 PrefService* GetPrefs() { return profile_.GetPrefs(); } 22 PrefService* GetPrefs() { return profile_.GetPrefs(); }
25 const ACProviders* GetAutocompleteProviders() const { 23 const ACProviders* GetAutocompleteProviders() const {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // not expected to run in instant extended. 82 // not expected to run in instant extended.
85 int providers_with_instant_extended = 83 int providers_with_instant_extended =
86 observed_providers & 84 observed_providers &
87 ~AutocompleteProvider::TYPE_HISTORY_CONTENTS & 85 ~AutocompleteProvider::TYPE_HISTORY_CONTENTS &
88 ~AutocompleteProvider::TYPE_SHORTCUTS; 86 ~AutocompleteProvider::TYPE_SHORTCUTS;
89 // TODO(beaudoin): remove TYPE_SEARCH once it's no longer needed to pass 87 // TODO(beaudoin): remove TYPE_SEARCH once it's no longer needed to pass
90 // the Instant suggestion through via FinalizeInstantQuery. 88 // the Instant suggestion through via FinalizeInstantQuery.
91 chrome::EnableInstantExtendedAPIForTesting(); 89 chrome::EnableInstantExtendedAPIForTesting();
92 CreateController(); 90 CreateController();
93 AssertProviders(providers_with_instant_extended); 91 AssertProviders(providers_with_instant_extended);
94
95 } 92 }
96
97 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698