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

Side by Side Diff: chrome/browser/net/gaia/token_service_unittest.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_NET_GAIA_TOKEN_SERVICE_UNITTEST_H_ 7 #ifndef CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_UNITTEST_H_
8 #define CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_UNITTEST_H_ 8 #define CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_UNITTEST_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 14 matching lines...) Expand all
25 class TokenAvailableTracker : public TestNotificationTracker { 25 class TokenAvailableTracker : public TestNotificationTracker {
26 public: 26 public:
27 TokenAvailableTracker(); 27 TokenAvailableTracker();
28 virtual ~TokenAvailableTracker(); 28 virtual ~TokenAvailableTracker();
29 29
30 const TokenService::TokenAvailableDetails& details() { 30 const TokenService::TokenAvailableDetails& details() {
31 return details_; 31 return details_;
32 } 32 }
33 33
34 private: 34 private:
35 virtual void Observe(NotificationType type, 35 virtual void Observe(int type,
36 const NotificationSource& source, 36 const NotificationSource& source,
37 const NotificationDetails& details); 37 const NotificationDetails& details);
38 38
39 TokenService::TokenAvailableDetails details_; 39 TokenService::TokenAvailableDetails details_;
40 }; 40 };
41 41
42 class TokenFailedTracker : public TestNotificationTracker { 42 class TokenFailedTracker : public TestNotificationTracker {
43 public: 43 public:
44 TokenFailedTracker(); 44 TokenFailedTracker();
45 virtual ~TokenFailedTracker(); 45 virtual ~TokenFailedTracker();
46 46
47 const TokenService::TokenRequestFailedDetails& details() { 47 const TokenService::TokenRequestFailedDetails& details() {
48 return details_; 48 return details_;
49 } 49 }
50 50
51 private: 51 private:
52 virtual void Observe(NotificationType type, 52 virtual void Observe(int type,
53 const NotificationSource& source, 53 const NotificationSource& source,
54 const NotificationDetails& details); 54 const NotificationDetails& details);
55 55
56 TokenService::TokenRequestFailedDetails details_; 56 TokenService::TokenRequestFailedDetails details_;
57 }; 57 };
58 58
59 class TokenServiceTestHarness : public testing::Test { 59 class TokenServiceTestHarness : public testing::Test {
60 public: 60 public:
61 TokenServiceTestHarness(); 61 TokenServiceTestHarness();
62 virtual ~TokenServiceTestHarness(); 62 virtual ~TokenServiceTestHarness();
63 63
64 virtual void SetUp(); 64 virtual void SetUp();
65 65
66 virtual void TearDown(); 66 virtual void TearDown();
67 67
68 void WaitForDBLoadCompletion(); 68 void WaitForDBLoadCompletion();
69 69
70 MessageLoopForUI message_loop_; 70 MessageLoopForUI message_loop_;
71 BrowserThread ui_thread_; // Mostly so DCHECKS pass. 71 BrowserThread ui_thread_; // Mostly so DCHECKS pass.
72 BrowserThread db_thread_; // WDS on here 72 BrowserThread db_thread_; // WDS on here
73 73
74 TokenService service_; 74 TokenService service_;
75 TokenAvailableTracker success_tracker_; 75 TokenAvailableTracker success_tracker_;
76 TokenFailedTracker failure_tracker_; 76 TokenFailedTracker failure_tracker_;
77 GaiaAuthConsumer::ClientLoginResult credentials_; 77 GaiaAuthConsumer::ClientLoginResult credentials_;
78 scoped_ptr<TestingProfile> profile_; 78 scoped_ptr<TestingProfile> profile_;
79 }; 79 };
80 80
81 #endif // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_UNITTEST_H_ 81 #endif // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_UNITTEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/gaia/token_service.cc ('k') | chrome/browser/net/gaia/token_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698