Index: chrome/browser/signin/token_service.h |
diff --git a/chrome/browser/signin/token_service.h b/chrome/browser/signin/token_service.h |
index a4106d63cde735e2a9d7b2880e2b92e33c13adc2..ea7bd6e18b77cc2b61ec7a8b2c4000123a317e2b 100644 |
--- a/chrome/browser/signin/token_service.h |
+++ b/chrome/browser/signin/token_service.h |
@@ -31,6 +31,15 @@ |
// SetMyToken(notification.token()) |
// } |
// } |
+// |
+// There is currently no easy way to create a fake TokenService. Tests that want |
+// to use TokenService to issue tokens without the use of fake GaiaAuthFetchers |
+// or persisting the tokens to disk via WebDataService can do this by |
+// creating a TokenService (skipping the Initialize() step to avoid interacting |
+// with WebDataService) and calling IssueAuthTokenForTest() to issue new tokens. |
+// This will result in the TokenService sending out the appropriate |
+// TOKEN_AVAILABLE notification and returning the correct response to future |
+// calls to Has/GetTokenForService(). |
#ifndef CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_ |
#define CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_ |