| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/login/login_status_consumer.h" | 9 #include "chrome/browser/chromeos/login/login_status_consumer.h" |
| 10 #include "chrome/common/net/gaia/gaia_auth_consumer.h" | 10 #include "chrome/common/net/gaia/gaia_auth_consumer.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 class MockConsumer : public LoginStatusConsumer { | 16 class MockConsumer : public LoginStatusConsumer { |
| 17 public: | 17 public: |
| 18 MockConsumer() {} | 18 MockConsumer() {} |
| 19 ~MockConsumer() {} | 19 ~MockConsumer() {} |
| 20 MOCK_METHOD1(SetLoginFailure, void(const LoginFailure& error)); |
| 20 MOCK_METHOD1(OnLoginFailure, void(const LoginFailure& error)); | 21 MOCK_METHOD1(OnLoginFailure, void(const LoginFailure& error)); |
| 21 MOCK_METHOD4(OnLoginSuccess, void( | 22 MOCK_METHOD4(OnLoginSuccess, void( |
| 22 const std::string& username, | 23 const std::string& username, |
| 23 const std::string& password, | 24 const std::string& password, |
| 24 const GaiaAuthConsumer::ClientLoginResult& result, | 25 const GaiaAuthConsumer::ClientLoginResult& result, |
| 25 bool pending_requests)); | 26 bool pending_requests)); |
| 26 MOCK_METHOD0(OnOffTheRecordLoginSuccess, void(void)); | 27 MOCK_METHOD0(OnOffTheRecordLoginSuccess, void(void)); |
| 27 MOCK_METHOD1(OnPasswordChangeDetected, | 28 MOCK_METHOD1(OnPasswordChangeDetected, |
| 28 void(const GaiaAuthConsumer::ClientLoginResult& result)); | 29 void(const GaiaAuthConsumer::ClientLoginResult& result)); |
| 29 | 30 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 static void OnMigrateQuitAndFail( | 77 static void OnMigrateQuitAndFail( |
| 77 const GaiaAuthConsumer::ClientLoginResult& credentials) { | 78 const GaiaAuthConsumer::ClientLoginResult& credentials) { |
| 78 ADD_FAILURE() << "Should not have detected a PW change!"; | 79 ADD_FAILURE() << "Should not have detected a PW change!"; |
| 79 MessageLoop::current()->Quit(); | 80 MessageLoop::current()->Quit(); |
| 80 } | 81 } |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace chromeos | 84 } // namespace chromeos |
| 84 | 85 |
| 85 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ | 86 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_ |
| OLD | NEW |