mock_login_utils.h revision 7d4cd473f85ac64c3747c96c277f9e506a0d2246
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. 4 5#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ 6#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ 7 8#include <string> 9 10#include "base/command_line.h" 11#include "base/memory/ref_counted.h" 12#include "chrome/browser/chromeos/login/authenticator.h" 13#include "chrome/browser/chromeos/login/fake_login_utils.h" 14#include "chrome/browser/chromeos/login/login_display_host.h" 15#include "chrome/browser/chromeos/login/login_utils.h" 16#include "google_apis/gaia/gaia_auth_consumer.h" 17#include "googleurl/src/gurl.h" 18#include "testing/gmock/include/gmock/gmock.h" 19 20class PrefService; 21class Profile; 22 23namespace chromeos { 24 25class LoginStatusConsumer; 26struct UserContext; 27 28class MockLoginUtils : public LoginUtils { 29 public: 30 MockLoginUtils(); 31 virtual ~MockLoginUtils(); 32 33 MOCK_METHOD2(DoBrowserLaunch, void(Profile*, LoginDisplayHost*)); 34 MOCK_METHOD6(PrepareProfile, 35 void(const UserContext&, const std::string&, 36 bool, bool, bool, LoginUtils::Delegate*)); 37 MOCK_METHOD1(DelegateDeleted, void(LoginUtils::Delegate*)); 38 MOCK_METHOD1(CompleteOffTheRecordLogin, void(const GURL&)); 39 MOCK_METHOD1(SetFirstLoginPrefs, void(PrefService*)); 40 MOCK_METHOD1(CreateAuthenticator, 41 scoped_refptr<Authenticator>(LoginStatusConsumer*)); 42 MOCK_METHOD1(RestoreAuthenticationSession, void(Profile*)); 43 MOCK_METHOD1(StartTokenServices, void(Profile*)); 44 MOCK_METHOD2(TransferDefaultCookiesAndServerBoundCerts, 45 void(Profile*, Profile*)); 46 MOCK_METHOD2(TransferDefaultAuthCache, void(Profile*, Profile*)); 47 MOCK_METHOD0(StopBackgroundFetchers, void(void)); 48 MOCK_METHOD1(InitRlzDelayed, void(Profile*)); 49 50 void DelegateToFake(); 51 FakeLoginUtils* GetFakeLoginUtils(); 52 53 private: 54 scoped_ptr<FakeLoginUtils> fake_login_utils_; 55}; 56 57} // namespace chromeos 58 59#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ 60