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

Side by Side Diff: chrome/browser/sync/test/integration/search_engines_helper.cc

Issue 1135163002: Omnibox - Strip Extra Whitespace from Custom Search Engine Names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests that don't set short_name Created 5 years, 7 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/sync/test/integration/search_engines_helper.h" 5 #include "chrome/browser/sync/test/integration/search_engines_helper.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 return CreateTestTemplateURL(profile, seed, keyword, 188 return CreateTestTemplateURL(profile, seed, keyword,
189 base::StringPrintf("http://www.test%d.com/", seed), sync_guid); 189 base::StringPrintf("http://www.test%d.com/", seed), sync_guid);
190 } 190 }
191 191
192 TemplateURL* CreateTestTemplateURL(Profile* profile, 192 TemplateURL* CreateTestTemplateURL(Profile* profile,
193 int seed, 193 int seed,
194 const base::string16& keyword, 194 const base::string16& keyword,
195 const std::string& url, 195 const std::string& url,
196 const std::string& sync_guid) { 196 const std::string& sync_guid) {
197 TemplateURLData data; 197 TemplateURLData data;
198 data.short_name = CreateKeyword(seed); 198 data.SetShortName(CreateKeyword(seed));
199 data.SetKeyword(keyword); 199 data.SetKeyword(keyword);
200 data.SetURL(url); 200 data.SetURL(url);
201 data.favicon_url = GURL("http://favicon.url"); 201 data.favicon_url = GURL("http://favicon.url");
202 data.safe_for_autoreplace = true; 202 data.safe_for_autoreplace = true;
203 data.date_created = base::Time::FromTimeT(100); 203 data.date_created = base::Time::FromTimeT(100);
204 data.last_modified = base::Time::FromTimeT(100); 204 data.last_modified = base::Time::FromTimeT(100);
205 data.prepopulate_id = 999999; 205 data.prepopulate_id = 999999;
206 data.sync_guid = sync_guid; 206 data.sync_guid = sync_guid;
207 return new TemplateURL(data); 207 return new TemplateURL(data);
208 } 208 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 service->SetUserSelectedDefaultSearchProvider(turl); 259 service->SetUserSelectedDefaultSearchProvider(turl);
260 if (test()->use_verifier()) { 260 if (test()->use_verifier()) {
261 TemplateURL* verifier_turl = 261 TemplateURL* verifier_turl =
262 GetVerifierService()->GetTemplateURLForKeyword(CreateKeyword(seed)); 262 GetVerifierService()->GetTemplateURLForKeyword(CreateKeyword(seed));
263 ASSERT_TRUE(verifier_turl); 263 ASSERT_TRUE(verifier_turl);
264 GetVerifierService()->SetUserSelectedDefaultSearchProvider(verifier_turl); 264 GetVerifierService()->SetUserSelectedDefaultSearchProvider(verifier_turl);
265 } 265 }
266 } 266 }
267 267
268 } // namespace search_engines_helper 268 } // namespace search_engines_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698