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

Unified Diff: trunk/src/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
Index: trunk/src/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc
===================================================================
--- trunk/src/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc (revision 219785)
+++ trunk/src/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc (working copy)
@@ -13,7 +13,6 @@
#include "chrome/browser/signin/signin_promo.h"
#include "chrome/common/chrome_switches.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 {
@@ -29,6 +28,9 @@
// testing::Test:
virtual void SetUp() OVERRIDE {
+ testing::Test::SetUp();
+ profile_.reset(new TestingProfile());
+
// Disable sync to simplify the creation of a OneClickSigninSyncStarter.
CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync);
@@ -36,9 +38,9 @@
SigninManagerBase* signin_manager =
static_cast<FakeSigninManager*>(
SigninManagerFactory::GetInstance()->SetTestingFactoryAndUse(
- &profile_,
+ profile_.get(),
&OneClickSigninSyncStarterTest::BuildSigninManager));
- signin_manager->Initialize(&profile_, NULL);
+ signin_manager->Initialize(profile_.get(), NULL);
signin_manager->SetAuthenticatedUsername(kTestingUsername);
}
@@ -52,7 +54,7 @@
protected:
void CreateSyncStarter(OneClickSigninSyncStarter::Callback callback) {
sync_starter_ = new OneClickSigninSyncStarter(
- &profile_,
+ profile_.get(),
NULL,
std::string(),
kTestingUsername,
@@ -65,8 +67,7 @@
);
}
- content::TestBrowserThreadBundle thread_bundle_;
- TestingProfile profile_;
+ scoped_ptr<TestingProfile> profile_;
// Deletes itself when SigninFailed() or SigninSuccess() is called.
OneClickSigninSyncStarter* sync_starter_;

Powered by Google App Engine
This is Rietveld 408576698