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

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

Issue 376413002: Stop using TemplateURLServiceTestUtil to initialize TemplateURLServiceFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TemplateURLServiceWithoutFallbackTest Created 6 years, 5 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 | « no previous file | chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc » ('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 (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/autocomplete_result.h" 5 #include "chrome/browser/autocomplete/autocomplete_result.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 field_trial_list_.reset(new base::FieldTrialList( 89 field_trial_list_.reset(new base::FieldTrialList(
90 new metrics::SHA1EntropyProvider("foo"))); 90 new metrics::SHA1EntropyProvider("foo")));
91 chrome_variations::testing::ClearAllVariationParams(); 91 chrome_variations::testing::ClearAllVariationParams();
92 } 92 }
93 93
94 virtual void SetUp() OVERRIDE { 94 virtual void SetUp() OVERRIDE {
95 #if defined(OS_ANDROID) 95 #if defined(OS_ANDROID)
96 TemplateURLPrepopulateData::InitCountryCode( 96 TemplateURLPrepopulateData::InitCountryCode(
97 std::string() /* unknown country code */); 97 std::string() /* unknown country code */);
98 #endif 98 #endif
99 test_util_.SetUp();
100 test_util_.VerifyLoad(); 99 test_util_.VerifyLoad();
101 } 100 }
102 101
103 virtual void TearDown() OVERRIDE {
104 test_util_.TearDown();
105 }
106
107 // Configures |match| from |data|. 102 // Configures |match| from |data|.
108 static void PopulateAutocompleteMatch(const TestData& data, 103 static void PopulateAutocompleteMatch(const TestData& data,
109 AutocompleteMatch* match); 104 AutocompleteMatch* match);
110 105
111 // Adds |count| AutocompleteMatches to |matches|. 106 // Adds |count| AutocompleteMatches to |matches|.
112 static void PopulateAutocompleteMatches(const TestData* data, 107 static void PopulateAutocompleteMatches(const TestData* data,
113 size_t count, 108 size_t count,
114 ACMatches* matches); 109 ACMatches* matches);
115 110
116 // Asserts that |result| has |expected_count| matches matching |expected|. 111 // Asserts that |result| has |expected_count| matches matching |expected|.
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 result.Reset(); 849 result.Reset();
855 matches.clear(); 850 matches.clear();
856 851
857 // Case 5: Multiple verbatim matches found in AutocompleteResult. 852 // Case 5: Multiple verbatim matches found in AutocompleteResult.
858 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches, 853 PopulateAutocompleteMatchesFromTestData(kVerbatimMatches,
859 arraysize(kVerbatimMatches), 854 arraysize(kVerbatimMatches),
860 &matches); 855 &matches);
861 result.AppendMatches(matches); 856 result.AppendMatches(matches);
862 EXPECT_FALSE(result.ShouldHideTopMatch()); 857 EXPECT_FALSE(result.ShouldHideTopMatch());
863 } 858 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698