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_UTILS_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_
10 #include "base/command_line.h"
11 #include "base/memory/ref_counted.h"
12 #include "chrome/browser/chromeos/login/fake_login_utils.h"
13 #include "chrome/browser/chromeos/login/login_utils.h"
14 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
15 #include "chromeos/login/auth/authenticator.h"
16 #include "google_apis/gaia/gaia_auth_consumer.h"
17 #include "testing/gmock/include/gmock/gmock.h"
25 class AuthStatusConsumer;
28 class MockLoginUtils : public LoginUtils {
31 virtual ~MockLoginUtils();
33 MOCK_METHOD2(RespectLocalePreference, void(Profile*,
34 const base::Closure& callback));
35 MOCK_METHOD2(DoBrowserLaunch, void(Profile*, LoginDisplayHost*));
36 MOCK_METHOD4(PrepareProfile,
37 void(const UserContext&,
38 bool, bool, LoginUtils::Delegate*));
39 MOCK_METHOD1(DelegateDeleted, void(LoginUtils::Delegate*));
40 MOCK_METHOD1(CompleteOffTheRecordLogin, void(const GURL&));
41 MOCK_METHOD1(CreateAuthenticator,
42 scoped_refptr<Authenticator>(AuthStatusConsumer*));
43 MOCK_METHOD1(StartTokenServices, void(Profile*));
44 MOCK_METHOD2(TransferDefaultCookiesAndChannelIDs,
45 void(Profile*, Profile*));
46 MOCK_METHOD2(TransferDefaultAuthCache, void(Profile*, Profile*));
47 MOCK_METHOD0(StopBackgroundFetchers, void(void));
48 MOCK_METHOD2(RestartToApplyPerSessionFlagsIfNeed,
49 bool(Profile*, bool early_restart));
51 void DelegateToFake();
52 FakeLoginUtils* GetFakeLoginUtils();
55 scoped_ptr<FakeLoginUtils> fake_login_utils_;
58 } // namespace chromeos
60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_