1// Copyright 2014 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#include "chrome/browser/chromeos/login/enrollment/mock_auto_enrollment_check_screen.h"
6
7using ::testing::AtLeast;
8using ::testing::NotNull;
9
10namespace chromeos {
11
12MockAutoEnrollmentCheckScreen::MockAutoEnrollmentCheckScreen(
13    ScreenObserver* screen_observer,
14    AutoEnrollmentCheckScreenActor* actor)
15    : AutoEnrollmentCheckScreen(screen_observer,
16                                actor) {
17}
18
19MockAutoEnrollmentCheckScreen::~MockAutoEnrollmentCheckScreen() { }
20
21MockAutoEnrollmentCheckScreenActor::MockAutoEnrollmentCheckScreenActor()
22    : screen_(NULL) {
23  EXPECT_CALL(*this, MockSetDelegate(NotNull())).Times(AtLeast(1));
24}
25
26
27MockAutoEnrollmentCheckScreenActor::~MockAutoEnrollmentCheckScreenActor() {
28  if (screen_)
29    screen_->OnActorDestroyed(this);
30}
31
32void MockAutoEnrollmentCheckScreenActor::SetDelegate(Delegate* screen) {
33  screen_ = screen;
34  MockSetDelegate(screen);
35}
36
37}  // namespace chromeos
38