Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / mock_login_status_consumer.h
blob1ef80dc307013745705fc9fc9a18ec739510e990
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_
8 #include "chrome/browser/chromeos/login/login_status_consumer.h"
9 #include "chrome/browser/chromeos/login/user.h"
10 #include "testing/gmock/include/gmock/gmock.h"
12 namespace chromeos {
14 class MockConsumer : public LoginStatusConsumer {
15 public:
16 MockConsumer();
17 virtual ~MockConsumer();
19 MOCK_METHOD1(OnLoginFailure, void(const LoginFailure& error));
20 MOCK_METHOD1(OnRetailModeLoginSuccess, void(
21 const UserContext& user_context));
22 MOCK_METHOD1(OnLoginSuccess, void(const UserContext& user_context));
23 MOCK_METHOD0(OnOffTheRecordLoginSuccess, void(void));
24 MOCK_METHOD0(OnPasswordChangeDetected, void(void));
26 // The following functions can be used in gmock Invoke() clauses.
28 // Compatible with LoginStatusConsumer::OnRetailModeLoginSuccess()
29 static void OnRetailModeSuccessQuit(const UserContext& user_context);
30 static void OnRetailModeSuccessQuitAndFail(
31 const UserContext& user_context);
33 // Compatible with LoginStatusConsumer::OnOffTheRecordLoginSuccess()
34 static void OnGuestSuccessQuit();
35 static void OnGuestSuccessQuitAndFail();
37 // Compatible with LoginStatusConsumer::OnLoginSuccess()
38 static void OnSuccessQuit(const UserContext& user_context);
39 static void OnSuccessQuitAndFail(const UserContext& user_context);
41 // Compatible with LoginStatusConsumer::OnLoginFailure()
42 static void OnFailQuit(const LoginFailure& error);
43 static void OnFailQuitAndFail(const LoginFailure& error);
45 // Compatible with LoginStatusConsumer::OnPasswordChangeDetected()
46 static void OnMigrateQuit();
47 static void OnMigrateQuitAndFail();
50 } // namespace chromeos
52 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_STATUS_CONSUMER_H_