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

Unified Diff: chrome/browser/signin/token_service_unittest.h

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments. merge to ToT. Murder a DB thread and more TestBrowserThreads. 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
Index: chrome/browser/signin/token_service_unittest.h
diff --git a/chrome/browser/signin/token_service_unittest.h b/chrome/browser/signin/token_service_unittest.h
index 9730b2a89889d9ec59baa29f0076e8ad1e05beb6..2161b81011d5dbf44667e4481c96181fab7cca73 100644
--- a/chrome/browser/signin/token_service_unittest.h
+++ b/chrome/browser/signin/token_service_unittest.h
@@ -13,7 +13,7 @@
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "content/public/test/test_notification_tracker.h"
#include "google_apis/gaia/gaia_auth_consumer.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -56,19 +56,24 @@ class TokenFailedTracker : public content::TestNotificationTracker {
};
class TokenServiceTestHarness : public testing::Test {
- public:
+ protected:
TokenServiceTestHarness();
virtual ~TokenServiceTestHarness();
virtual void SetUp() OVERRIDE;
-
virtual void TearDown() OVERRIDE;
- void WaitForDBLoadCompletion();
+ void UpdateCredentialsOnService();
+ TestingProfile* profile() const { return profile_.get(); }
+ TokenService* service() const { return service_; }
+ const GaiaAuthConsumer::ClientLoginResult& credentials() const {
+ return credentials_;
+ }
+ TokenAvailableTracker* success_tracker() { return &success_tracker_; }
+ TokenFailedTracker* failure_tracker() { return &failure_tracker_; }
- base::MessageLoopForUI message_loop_;
- content::TestBrowserThread ui_thread_; // Mostly so DCHECKS pass.
- content::TestBrowserThread db_thread_; // WDS on here
+ private:
+ content::TestBrowserThreadBundle thread_bundle_;
TokenService* service_;
TokenAvailableTracker success_tracker_;

Powered by Google App Engine
This is Rietveld 408576698