OLD | NEW |
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 // TODO(beaudoin): What is really needed here? | 5 // TODO(beaudoin): What is really needed here? |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 Profile* profile_; | 207 Profile* profile_; |
208 SuggestionsHandler* suggestions_handler_; | 208 SuggestionsHandler* suggestions_handler_; |
209 SuggestionsCombiner* combiner_; | 209 SuggestionsCombiner* combiner_; |
210 | 210 |
211 void Reset() { | 211 void Reset() { |
212 delete combiner_; | 212 delete combiner_; |
213 combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_); | 213 combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_); |
214 } | 214 } |
215 | 215 |
216 private: | 216 private: |
217 virtual void SetUp() { | 217 void SetUp() override { |
218 profile_ = new TestingProfile(); | 218 profile_ = new TestingProfile(); |
219 suggestions_handler_ = new SuggestionsHandler(); | 219 suggestions_handler_ = new SuggestionsHandler(); |
220 combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_); | 220 combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_); |
221 } | 221 } |
222 | 222 |
223 virtual void TearDown() { | 223 void TearDown() override { |
224 delete combiner_; | 224 delete combiner_; |
225 delete suggestions_handler_; | 225 delete suggestions_handler_; |
226 delete profile_; | 226 delete profile_; |
227 } | 227 } |
228 | 228 |
229 DISALLOW_COPY_AND_ASSIGN(SuggestionsCombinerTest); | 229 DISALLOW_COPY_AND_ASSIGN(SuggestionsCombinerTest); |
230 }; | 230 }; |
231 | 231 |
232 TEST_F(SuggestionsCombinerTest, NoSource) { | 232 TEST_F(SuggestionsCombinerTest, NoSource) { |
233 combiner_->FetchItems(NULL); | 233 combiner_->FetchItems(NULL); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } else { | 287 } else { |
288 EXPECT_EQ(description.results[j], static_cast<const char*>(NULL)) << | 288 EXPECT_EQ(description.results[j], static_cast<const char*>(NULL)) << |
289 " test index:" << i; | 289 " test index:" << i; |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
293 Reset(); | 293 Reset(); |
294 } | 294 } |
295 } | 295 } |
296 | 296 |
OLD | NEW |