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

Side by Side Diff: chrome/browser/search/instant_unittest_base.cc

Issue 1543203002: Remove a variety of no-longer-used query params. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 11 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 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 "chrome/browser/search/instant_unittest_base.h" 5 #include "chrome/browser/search/instant_unittest_base.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 SetUpHelper(); 47 SetUpHelper();
48 } 48 }
49 #endif 49 #endif
50 50
51 void InstantUnitTestBase::SetUserSelectedDefaultSearchProvider( 51 void InstantUnitTestBase::SetUserSelectedDefaultSearchProvider(
52 const std::string& base_url) { 52 const std::string& base_url) {
53 TemplateURLData data; 53 TemplateURLData data;
54 data.SetShortName(base::UTF8ToUTF16(base_url)); 54 data.SetShortName(base::UTF8ToUTF16(base_url));
55 data.SetKeyword(base::UTF8ToUTF16(base_url)); 55 data.SetKeyword(base::UTF8ToUTF16(base_url));
56 data.SetURL(base_url + "url?bar={searchTerms}"); 56 data.SetURL(base_url + "url?bar={searchTerms}");
57 data.instant_url = base_url + 57 data.instant_url =
58 "instant?{google:omniboxStartMarginParameter}{google:forceInstantResults}" 58 base_url + "instant?{google:forceInstantResults}foo=foo#foo=foo&strk";
59 "foo=foo#foo=foo&strk";
60 data.new_tab_url = base_url + "newtab"; 59 data.new_tab_url = base_url + "newtab";
61 data.alternate_urls.push_back(base_url + "alt#quux={searchTerms}"); 60 data.alternate_urls.push_back(base_url + "alt#quux={searchTerms}");
62 data.search_terms_replacement_key = "strk"; 61 data.search_terms_replacement_key = "strk";
63 62
64 TemplateURL* template_url = new TemplateURL(data); 63 TemplateURL* template_url = new TemplateURL(data);
65 // Takes ownership of |template_url|. 64 // Takes ownership of |template_url|.
66 template_url_service_->Add(template_url); 65 template_url_service_->Add(template_url);
67 template_url_service_->SetUserSelectedDefaultSearchProvider(template_url); 66 template_url_service_->SetUserSelectedDefaultSearchProvider(template_url);
68 } 67 }
69 68
(...skipping 23 matching lines...) Expand all
93 void InstantUnitTestBase::SetUpHelper() { 92 void InstantUnitTestBase::SetUpHelper() {
94 BrowserWithTestWindowTest::SetUp(); 93 BrowserWithTestWindowTest::SetUp();
95 94
96 template_url_service_ = TemplateURLServiceFactory::GetForProfile(profile()); 95 template_url_service_ = TemplateURLServiceFactory::GetForProfile(profile());
97 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service_); 96 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service_);
98 97
99 UIThreadSearchTermsData::SetGoogleBaseURL("https://www.google.com/"); 98 UIThreadSearchTermsData::SetGoogleBaseURL("https://www.google.com/");
100 SetUserSelectedDefaultSearchProvider("{google:baseURL}"); 99 SetUserSelectedDefaultSearchProvider("{google:baseURL}");
101 instant_service_ = InstantServiceFactory::GetForProfile(profile()); 100 instant_service_ = InstantServiceFactory::GetForProfile(profile());
102 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/search/instant_service_unittest.cc ('k') | chrome/browser/search_engines/ui_thread_search_terms_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698