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

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

Issue 651193002: Remove NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@373326.2
Patch Set: Address comments Created 6 years, 2 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
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_quick_provider.h" 5 #include "chrome/browser/autocomplete/history_quick_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 private: 124 private:
125 std::set<std::string> matches_; 125 std::set<std::string> matches_;
126 }; 126 };
127 127
128 static KeyedService* CreateTemplateURLService( 128 static KeyedService* CreateTemplateURLService(
129 content::BrowserContext* context) { 129 content::BrowserContext* context) {
130 Profile* profile = static_cast<Profile*>(context); 130 Profile* profile = static_cast<Profile*>(context);
131 return new TemplateURLService( 131 return new TemplateURLService(
132 profile->GetPrefs(), make_scoped_ptr(new SearchTermsData), NULL, 132 profile->GetPrefs(), make_scoped_ptr(new SearchTermsData), NULL,
133 scoped_ptr<TemplateURLServiceClient>( 133 scoped_ptr<TemplateURLServiceClient>(
134 new ChromeTemplateURLServiceClient(profile)), 134 new ChromeTemplateURLServiceClient(
135 HistoryServiceFactory::GetForProfile(
136 profile, Profile::EXPLICIT_ACCESS))),
135 NULL, NULL, base::Closure()); 137 NULL, NULL, base::Closure());
136 } 138 }
137 139
138 virtual void SetUp(); 140 virtual void SetUp();
139 virtual void TearDown(); 141 virtual void TearDown();
140 142
141 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); 143 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data);
142 144
143 // Fills test data into the history system. 145 // Fills test data into the history system.
144 void FillData(); 146 void FillData();
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 777
776 TEST_F(HQPOrderingTest, TEAMatch) { 778 TEST_F(HQPOrderingTest, TEAMatch) {
777 std::vector<std::string> expected_urls; 779 std::vector<std::string> expected_urls;
778 expected_urls.push_back("http://www.teamliquid.net/"); 780 expected_urls.push_back("http://www.teamliquid.net/");
779 expected_urls.push_back("http://www.teamliquid.net/tlpd"); 781 expected_urls.push_back("http://www.teamliquid.net/tlpd");
780 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); 782 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players");
781 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, 783 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true,
782 ASCIIToUTF16("www.teamliquid.net"), 784 ASCIIToUTF16("www.teamliquid.net"),
783 ASCIIToUTF16("mliquid.net")); 785 ASCIIToUTF16("mliquid.net"));
784 } 786 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698