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

Unified Diff: chrome/browser/managed_mode/managed_user_refresh_token_fetcher_unittest.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix InstantNTP test. Created 7 years, 5 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/io_thread.cc ('k') | chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/managed_mode/managed_user_refresh_token_fetcher_unittest.cc
diff --git a/chrome/browser/managed_mode/managed_user_refresh_token_fetcher_unittest.cc b/chrome/browser/managed_mode/managed_user_refresh_token_fetcher_unittest.cc
index 7b7bebfad86611788396be56e05eafdcd647af59..c547599775cbceee0f32236efe63f1df73121453 100644
--- a/chrome/browser/managed_mode/managed_user_refresh_token_fetcher_unittest.cc
+++ b/chrome/browser/managed_mode/managed_user_refresh_token_fetcher_unittest.cc
@@ -4,13 +4,12 @@
#include "base/bind.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/managed_mode/managed_user_refresh_token_fetcher.h"
#include "chrome/browser/signin/oauth2_token_service.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "google_apis/gaia/gaia_oauth_client.h"
#include "google_apis/gaia/gaia_urls.h"
#include "google_apis/gaia/google_service_auth_error.h"
@@ -195,9 +194,7 @@ class ManagedUserRefreshTokenFetcherTest : public testing::Test {
void OnTokenFetched(const GoogleServiceAuthError& error,
const std::string& token);
- base::WeakPtrFactory<ManagedUserRefreshTokenFetcherTest> weak_ptr_factory_;
- base::MessageLoop message_loop_;
- content::TestBrowserThread ui_thread_;
+ content::TestBrowserThreadBundle thread_bundle_;
TestingProfile profile_;
MockOAuth2TokenService oauth2_token_service_;
net::TestURLFetcherFactory url_fetcher_factory_;
@@ -205,15 +202,15 @@ class ManagedUserRefreshTokenFetcherTest : public testing::Test {
GoogleServiceAuthError error_;
std::string token_;
+ base::WeakPtrFactory<ManagedUserRefreshTokenFetcherTest> weak_ptr_factory_;
};
ManagedUserRefreshTokenFetcherTest::ManagedUserRefreshTokenFetcherTest()
- : weak_ptr_factory_(this),
- ui_thread_(content::BrowserThread::UI, &message_loop_),
- token_fetcher_(
+ : token_fetcher_(
ManagedUserRefreshTokenFetcher::Create(&oauth2_token_service_,
profile_.GetRequestContext())),
- error_(GoogleServiceAuthError::NONE) {}
+ error_(GoogleServiceAuthError::NONE),
+ weak_ptr_factory_(this) {}
void ManagedUserRefreshTokenFetcherTest::StartFetching() {
token_fetcher_->Start(kManagedUserId, UTF8ToUTF16(kName), kDeviceName,
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698