This source file includes following definitions.
- DelegateToFake
- GetFakeLoginUtils
#include "chrome/browser/chromeos/login/mock_login_utils.h"
using namespace testing;
namespace chromeos {
MockLoginUtils::MockLoginUtils() {}
MockLoginUtils::~MockLoginUtils() {}
void MockLoginUtils::DelegateToFake() {
if (fake_login_utils_.get())
return;
fake_login_utils_.reset(new FakeLoginUtils());
FakeLoginUtils* fake = fake_login_utils_.get();
ON_CALL(*this, DoBrowserLaunch(_, _))
.WillByDefault(Invoke(fake, &FakeLoginUtils::DoBrowserLaunch));
ON_CALL(*this, PrepareProfile(_, _, _, _, _))
.WillByDefault(Invoke(fake, &FakeLoginUtils::PrepareProfile));
ON_CALL(*this, CreateAuthenticator(_))
.WillByDefault(Invoke(fake, &FakeLoginUtils::CreateAuthenticator));
}
FakeLoginUtils* MockLoginUtils::GetFakeLoginUtils() {
return fake_login_utils_.get();
}
}