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

Side by Side Diff: chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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 (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"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h" 14 #include "chrome/browser/ui/webui/ntp/suggestions_combiner.h"
15 #include "chrome/browser/ui/webui/ntp/suggestions_page_handler.h" 15 #include "chrome/browser/ui/webui/ntp/suggestions_page_handler.h"
16 #include "chrome/browser/ui/webui/ntp/suggestions_source.h" 16 #include "chrome/browser/ui/webui/ntp/suggestions_source.h"
17 #include "chrome/test/base/testing_profile.h" 17 #include "chrome/test/base/testing_profile.h"
18 #include "content/public/test/test_browser_thread_bundle.h"
18 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
19 20
20 namespace { 21 namespace {
21 22
22 struct SourceInfo { 23 struct SourceInfo {
23 int weight; 24 int weight;
24 const char* source_name; 25 const char* source_name;
25 int number_of_suggestions; 26 int number_of_suggestions;
26 }; 27 };
27 28
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 198
198 DISALLOW_COPY_AND_ASSIGN(SuggestionsSourceStub); 199 DISALLOW_COPY_AND_ASSIGN(SuggestionsSourceStub);
199 }; 200 };
200 201
201 class SuggestionsCombinerTest : public testing::Test { 202 class SuggestionsCombinerTest : public testing::Test {
202 public: 203 public:
203 SuggestionsCombinerTest() { 204 SuggestionsCombinerTest() {
204 } 205 }
205 206
206 protected: 207 protected:
208 content::TestBrowserThreadBundle thread_bundle_;
207 Profile* profile_; 209 Profile* profile_;
208 SuggestionsHandler* suggestions_handler_; 210 SuggestionsHandler* suggestions_handler_;
209 SuggestionsCombiner* combiner_; 211 SuggestionsCombiner* combiner_;
210 212
211 void Reset() { 213 void Reset() {
212 delete combiner_; 214 delete combiner_;
213 combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_); 215 combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_);
214 } 216 }
215 217
216 private: 218 private:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } else { 289 } else {
288 EXPECT_EQ(description.results[j], static_cast<const char*>(NULL)) << 290 EXPECT_EQ(description.results[j], static_cast<const char*>(NULL)) <<
289 " test index:" << i; 291 " test index:" << i;
290 } 292 }
291 } 293 }
292 294
293 Reset(); 295 Reset();
294 } 296 }
295 } 297 }
296 298
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698