| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/common/net/gaia/gaia_authenticator.h" | 5 #include "chrome/common/net/gaia/gaia_authenticator.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/common/net/http_return.h" | 9 #include "chrome/common/net/http_return.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Dummy delay value. | 34 // Dummy delay value. |
| 35 return 5; | 35 return 5; |
| 36 } | 36 } |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 TEST(GaiaAuthenticatorTest, TestNewlineAtEndOfAuthTokenRemoved) { | 39 TEST(GaiaAuthenticatorTest, TestNewlineAtEndOfAuthTokenRemoved) { |
| 40 GaiaAuthMockForGaiaAuthenticator mock_auth; | 40 GaiaAuthMockForGaiaAuthenticator mock_auth; |
| 41 MessageLoop message_loop; | 41 MessageLoop message_loop; |
| 42 mock_auth.set_message_loop(&message_loop); | 42 mock_auth.set_message_loop(&message_loop); |
| 43 GaiaAuthenticator::AuthResults results; | 43 GaiaAuthenticator::AuthResults results; |
| 44 EXPECT_TRUE(mock_auth.IssueAuthToken(&results, "sid", true)); | 44 EXPECT_TRUE(mock_auth.IssueAuthToken(&results, "sid")); |
| 45 EXPECT_EQ(0, results.auth_token.compare("body")); | 45 EXPECT_EQ(0, results.auth_token.compare("body")); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace gaia | 48 } // namespace gaia |
| 49 | 49 |
| OLD | NEW |