| Index: chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc b/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
|
| index 9b749a846fb8589dfbdac7326a8c5261060685cb..69a79cb28aef8da82c81b88e64fed32deb014aff 100644
|
| --- a/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
|
| +++ b/chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc
|
| @@ -15,6 +15,7 @@
|
| #include "chrome/browser/ui/webui/ntp/suggestions_page_handler.h"
|
| #include "chrome/browser/ui/webui/ntp/suggestions_source.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| +#include "content/public/test/test_browser_thread_bundle.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace {
|
| @@ -207,34 +208,23 @@ class SuggestionsSourceStub : public SuggestionsSource {
|
| };
|
|
|
| class SuggestionsCombinerTest : public testing::Test {
|
| - public:
|
| - SuggestionsCombinerTest() {
|
| - }
|
| -
|
| protected:
|
| - Profile* profile_;
|
| - SuggestionsHandler* suggestions_handler_;
|
| - SuggestionsCombiner* combiner_;
|
| -
|
| - void Reset() {
|
| - delete combiner_;
|
| - combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_);
|
| - }
|
| -
|
| - private:
|
| virtual void SetUp() {
|
| - profile_ = new TestingProfile();
|
| - suggestions_handler_ = new SuggestionsHandler();
|
| - combiner_ = new SuggestionsCombiner(suggestions_handler_, profile_);
|
| + thread_bundle_.reset(new content::TestBrowserThreadBundle());
|
| + profile_.reset(new TestingProfile());
|
| + suggestions_handler_.reset(new SuggestionsHandler());
|
| + Reset();
|
| }
|
|
|
| - virtual void TearDown() {
|
| - delete combiner_;
|
| - delete suggestions_handler_;
|
| - delete profile_;
|
| + void Reset() {
|
| + combiner_.reset(
|
| + new SuggestionsCombiner(suggestions_handler_.get(), profile_.get()));
|
| }
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(SuggestionsCombinerTest);
|
| + scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_;
|
| + scoped_ptr<Profile> profile_;
|
| + scoped_ptr<SuggestionsHandler> suggestions_handler_;
|
| + scoped_ptr<SuggestionsCombiner> combiner_;
|
| };
|
|
|
| TEST_F(SuggestionsCombinerTest, NoSource) {
|
|
|