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

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

Issue 164023002: [Clean up] Delete InstantUnitTestBase::SetUpWithoutCacheableNTP(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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_unittest_base.h ('k') | no next file » | 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 19 matching lines...) Expand all
30 new metrics::SHA1EntropyProvider("42"))); 30 new metrics::SHA1EntropyProvider("42")));
31 } 31 }
32 32
33 InstantUnitTestBase::~InstantUnitTestBase() { 33 InstantUnitTestBase::~InstantUnitTestBase() {
34 } 34 }
35 35
36 void InstantUnitTestBase::SetUp() { 36 void InstantUnitTestBase::SetUp() {
37 SetUpHelper(); 37 SetUpHelper();
38 } 38 }
39 39
40 void InstantUnitTestBase::SetUpWithoutCacheableNTP() {
41 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
42 "InstantExtended", "Group1 use_cacheable_ntp:0"));
43 SetUpHelper();
44 }
45
46 void InstantUnitTestBase::SetUpHelper() { 40 void InstantUnitTestBase::SetUpHelper() {
47 chrome::EnableQueryExtractionForTesting(); 41 chrome::EnableQueryExtractionForTesting();
48 BrowserWithTestWindowTest::SetUp(); 42 BrowserWithTestWindowTest::SetUp();
49 43
50 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( 44 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
51 profile(), &TemplateURLServiceFactory::BuildInstanceFor); 45 profile(), &TemplateURLServiceFactory::BuildInstanceFor);
52 template_url_service_ = TemplateURLServiceFactory::GetForProfile(profile()); 46 template_url_service_ = TemplateURLServiceFactory::GetForProfile(profile());
53 ui_test_utils::WaitForTemplateURLServiceToLoad(template_url_service_); 47 ui_test_utils::WaitForTemplateURLServiceToLoad(template_url_service_);
54 48
55 UIThreadSearchTermsData::SetGoogleBaseURL("https://www.google.com/"); 49 UIThreadSearchTermsData::SetGoogleBaseURL("https://www.google.com/");
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 content::Source<Profile>(profile()->GetOriginalProfile()), 91 content::Source<Profile>(profile()->GetOriginalProfile()),
98 content::Details<GoogleURLTracker::UpdatedDetails>(&details)); 92 content::Details<GoogleURLTracker::UpdatedDetails>(&details));
99 } 93 }
100 94
101 95
102 bool InstantUnitTestBase::IsInstantServiceObserver( 96 bool InstantUnitTestBase::IsInstantServiceObserver(
103 InstantServiceObserver* observer) { 97 InstantServiceObserver* observer) {
104 return instant_service_->observers_.HasObserver(observer); 98 return instant_service_->observers_.HasObserver(observer);
105 } 99 }
106 100
OLDNEW
« no previous file with comments | « chrome/browser/search/instant_unittest_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698