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

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

Issue 23455047: InstantExtended: Send search URLs to renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More browsertest fixes Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/search/instant_service_unittest.cc ('k') | chrome/browser/search/search.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/google/google_url_tracker.h" 10 #include "chrome/browser/google/google_url_tracker.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 UIThreadSearchTermsData::SetGoogleBaseURL(""); 45 UIThreadSearchTermsData::SetGoogleBaseURL("");
46 BrowserWithTestWindowTest::TearDown(); 46 BrowserWithTestWindowTest::TearDown();
47 } 47 }
48 48
49 void InstantUnitTestBase::SetDefaultSearchProvider( 49 void InstantUnitTestBase::SetDefaultSearchProvider(
50 const std::string& base_url) { 50 const std::string& base_url) {
51 TemplateURLData data; 51 TemplateURLData data;
52 data.SetURL(base_url + "url?bar={searchTerms}"); 52 data.SetURL(base_url + "url?bar={searchTerms}");
53 data.instant_url = base_url + "instant?" 53 data.instant_url = base_url + "instant?"
54 "{google:omniboxStartMarginParameter}foo=foo#foo=foo&strk"; 54 "{google:omniboxStartMarginParameter}foo=foo#foo=foo&strk";
55 data.new_tab_url = base_url + "newtab";
55 data.alternate_urls.push_back(base_url + "alt#quux={searchTerms}"); 56 data.alternate_urls.push_back(base_url + "alt#quux={searchTerms}");
56 data.search_terms_replacement_key = "strk"; 57 data.search_terms_replacement_key = "strk";
57 58
58 TemplateURL* template_url = new TemplateURL(profile(), data); 59 TemplateURL* template_url = new TemplateURL(profile(), data);
59 // Takes ownership of |template_url|. 60 // Takes ownership of |template_url|.
60 template_url_service_->Add(template_url); 61 template_url_service_->Add(template_url);
61 template_url_service_->SetDefaultSearchProvider(template_url); 62 template_url_service_->SetDefaultSearchProvider(template_url);
62 } 63 }
63 64
64 void InstantUnitTestBase::NotifyGoogleBaseURLUpdate( 65 void InstantUnitTestBase::NotifyGoogleBaseURLUpdate(
(...skipping 11 matching lines...) Expand all
76 content::Source<Profile>(profile()->GetOriginalProfile()), 77 content::Source<Profile>(profile()->GetOriginalProfile()),
77 content::Details<GoogleURLTracker::UpdatedDetails>(&details)); 78 content::Details<GoogleURLTracker::UpdatedDetails>(&details));
78 } 79 }
79 80
80 81
81 bool InstantUnitTestBase::IsInstantServiceObserver( 82 bool InstantUnitTestBase::IsInstantServiceObserver(
82 InstantServiceObserver* observer) { 83 InstantServiceObserver* observer) {
83 return instant_service_->observers_.HasObserver(observer); 84 return instant_service_->observers_.HasObserver(observer);
84 } 85 }
85 86
OLDNEW
« no previous file with comments | « chrome/browser/search/instant_service_unittest.cc ('k') | chrome/browser/search/search.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698