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

Side by Side Diff: chrome/browser/autocomplete/history_url_provider_unittest.cc

Issue 366523002: Stop depending on chrome/browser/rlz/rlz.h from TemplateURLService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 6 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/autocomplete/history_url_provider.h" 5 #include "chrome/browser/autocomplete/history_url_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 virtual ~HistoryURLProviderTest() { 163 virtual ~HistoryURLProviderTest() {
164 HistoryQuickProvider::set_disabled(false); 164 HistoryQuickProvider::set_disabled(false);
165 } 165 }
166 166
167 // AutocompleteProviderListener: 167 // AutocompleteProviderListener:
168 virtual void OnProviderUpdate(bool updated_matches) OVERRIDE; 168 virtual void OnProviderUpdate(bool updated_matches) OVERRIDE;
169 169
170 protected: 170 protected:
171 static KeyedService* CreateTemplateURLService( 171 static KeyedService* CreateTemplateURLService(
172 content::BrowserContext* profile) { 172 content::BrowserContext* profile) {
173 return new TemplateURLService(static_cast<Profile*>(profile), NULL); 173 return new TemplateURLService(static_cast<Profile*>(profile), NULL,
174 base::Closure());
174 } 175 }
175 176
176 // testing::Test 177 // testing::Test
177 virtual void SetUp() { 178 virtual void SetUp() {
178 ASSERT_TRUE(SetUpImpl(false)); 179 ASSERT_TRUE(SetUpImpl(false));
179 } 180 }
180 virtual void TearDown(); 181 virtual void TearDown();
181 182
182 // Does the real setup. 183 // Does the real setup.
183 bool SetUpImpl(bool no_db) WARN_UNUSED_RESULT; 184 bool SetUpImpl(bool no_db) WARN_UNUSED_RESULT;
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 autocomplete_->scoring_params_.experimental_scoring_enabled = true; 1021 autocomplete_->scoring_params_.experimental_scoring_enabled = true;
1021 ASSERT_NO_FATAL_FAILURE( 1022 ASSERT_NO_FATAL_FAILURE(
1022 RunTest(ASCIIToUTF16(test_cases[i].input), 1023 RunTest(ASCIIToUTF16(test_cases[i].input),
1023 base::string16(), false, output, max_matches)); 1024 base::string16(), false, output, max_matches));
1024 for (int j = 0; j < max_matches; ++j) { 1025 for (int j = 0; j < max_matches; ++j) {
1025 EXPECT_EQ(test_cases[i].matches[j].experiment_relevance, 1026 EXPECT_EQ(test_cases[i].matches[j].experiment_relevance,
1026 matches_[j].relevance); 1027 matches_[j].relevance);
1027 } 1028 }
1028 } 1029 }
1029 } 1030 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698