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

Side by Side Diff: chrome/browser/signin/token_service_unittest.h

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // This file defines a unit test harness for the profile's token service. 5 // This file defines a unit test harness for the profile's token service.
6 6
7 #ifndef CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_UNITTEST_H_ 7 #ifndef CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_UNITTEST_H_
8 #define CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_UNITTEST_H_ 8 #define CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_UNITTEST_H_
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 }; 56 };
57 57
58 class TokenServiceTestHarness : public testing::Test { 58 class TokenServiceTestHarness : public testing::Test {
59 protected: 59 protected:
60 TokenServiceTestHarness(); 60 TokenServiceTestHarness();
61 virtual ~TokenServiceTestHarness(); 61 virtual ~TokenServiceTestHarness();
62 62
63 virtual void SetUp() OVERRIDE; 63 virtual void SetUp() OVERRIDE;
64 virtual void TearDown() OVERRIDE; 64 virtual void TearDown() OVERRIDE;
65 65
66 virtual scoped_ptr<TestingProfile> CreateProfile();
66 void UpdateCredentialsOnService(); 67 void UpdateCredentialsOnService();
67 TestingProfile* profile() const { return profile_.get(); } 68 TestingProfile* profile() const { return profile_.get(); }
68 TokenService* service() const { return service_; } 69 TokenService* service() const { return service_; }
69 const GaiaAuthConsumer::ClientLoginResult& credentials() const { 70 const GaiaAuthConsumer::ClientLoginResult& credentials() const {
70 return credentials_; 71 return credentials_;
71 } 72 }
72 TokenAvailableTracker* success_tracker() { return &success_tracker_; } 73 TokenAvailableTracker* success_tracker() { return &success_tracker_; }
73 TokenFailedTracker* failure_tracker() { return &failure_tracker_; } 74 TokenFailedTracker* failure_tracker() { return &failure_tracker_; }
74 75
75 private: 76 private:
76 content::TestBrowserThreadBundle thread_bundle_; 77 content::TestBrowserThreadBundle thread_bundle_;
77 78
78 TokenService* service_; 79 TokenService* service_;
79 TokenAvailableTracker success_tracker_; 80 TokenAvailableTracker success_tracker_;
80 TokenFailedTracker failure_tracker_; 81 TokenFailedTracker failure_tracker_;
81 GaiaAuthConsumer::ClientLoginResult credentials_; 82 GaiaAuthConsumer::ClientLoginResult credentials_;
82 std::string oauth_token_; 83 std::string oauth_token_;
83 std::string oauth_secret_; 84 std::string oauth_secret_;
84 scoped_ptr<TestingProfile> profile_; 85 scoped_ptr<TestingProfile> profile_;
85 }; 86 };
86 87
87 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_UNITTEST_H_ 88 #endif // CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698