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

Unified Diff: chrome/browser/net/gaia/token_service_unittest.cc

Issue 8769053: Remove stuff in TokenService that is not needed anymore (due to OAuth based approach): (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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/net/gaia/token_service.cc ('k') | chrome/common/net/gaia/gaia_constants.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/gaia/token_service_unittest.cc
===================================================================
--- chrome/browser/net/gaia/token_service_unittest.cc (revision 112743)
+++ chrome/browser/net/gaia/token_service_unittest.cc (working copy)
@@ -378,60 +378,6 @@
EXPECT_FALSE(service_.HasTokenForService(GaiaConstants::kTalkService));
}
-TEST_F(TokenServiceTest, FullIntegrationNewServicesAdded) {
- std::string token1 = "token1";
-
- for (int i = 0; i < TokenService::kNumServices; ++i) {
- const char* service = TokenService::kServices[i];
- EXPECT_FALSE(service_.HasTokenForService(service));
- }
- {
- MockFactory<MockFetcher> factory;
- factory.set_results(token1);
- service_.StartFetchingTokens();
- }
-
- for (int i = 0; i < TokenService::kNumServices; ++i) {
- const char* service = TokenService::kServices[i];
- EXPECT_TRUE(service_.HasTokenForService(service));
- EXPECT_EQ(token1, service_.GetTokenForService(service));
- }
-
- // Clear tokens for some services to simulate that those services got
- // added in a new Chrome release.
- service_.token_map_.erase(GaiaConstants::kLSOService);
- service_.token_map_.erase(GaiaConstants::kCWSService);
-
- for (int i = 0; i < TokenService::kNumServices; ++i) {
- const char* service = TokenService::kServices[i];
- if (service == GaiaConstants::kLSOService ||
- service == GaiaConstants::kCWSService) {
- EXPECT_FALSE(service_.HasTokenForService(service));
- } else {
- EXPECT_TRUE(service_.HasTokenForService(service));
- EXPECT_EQ(token1, service_.GetTokenForService(service));
- }
- }
-
- std::string token2 = "token2";
- {
- MockFactory<MockFetcher> factory;
- factory.set_results(token2);
- service_.StartFetchingMissingTokens();
- }
-
- for (int i = 0; i < TokenService::kNumServices; ++i) {
- const char* service = TokenService::kServices[i];
- EXPECT_TRUE(service_.HasTokenForService(service));
- if (service == GaiaConstants::kLSOService ||
- service == GaiaConstants::kCWSService) {
- EXPECT_EQ(token2, service_.GetTokenForService(service));
- } else {
- EXPECT_EQ(token1, service_.GetTokenForService(service));
- }
- }
-}
-
TEST_F(TokenServiceTest, LoadTokensIntoMemoryBasic) {
// Validate that the method sets proper data in notifications and map.
std::map<std::string, std::string> db_tokens;
« no previous file with comments | « chrome/browser/net/gaia/token_service.cc ('k') | chrome/common/net/gaia/gaia_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698