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

Unified Diff: chrome/browser/ui/webui/ntp/suggestions_combiner_unittest.cc

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android webview init fix merged in. Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/net_internals/net_internals_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/ui/webui/net_internals/net_internals_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698