Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / login / enrollment / mock_auto_enrollment_check_screen.cc
blob6d9c0c8cb5d23571bb31c392e38ba295c10cba75
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.
5 #include "chrome/browser/chromeos/login/enrollment/mock_auto_enrollment_check_screen.h"
7 using ::testing::AtLeast;
8 using ::testing::NotNull;
10 namespace chromeos {
12 MockAutoEnrollmentCheckScreen::MockAutoEnrollmentCheckScreen(
13 BaseScreenDelegate* base_screen_delegate,
14 AutoEnrollmentCheckScreenActor* actor)
15 : AutoEnrollmentCheckScreen(base_screen_delegate, actor) {
18 MockAutoEnrollmentCheckScreen::~MockAutoEnrollmentCheckScreen() { }
20 MockAutoEnrollmentCheckScreenActor::MockAutoEnrollmentCheckScreenActor()
21 : screen_(NULL) {
22 EXPECT_CALL(*this, MockSetDelegate(NotNull())).Times(AtLeast(1));
26 MockAutoEnrollmentCheckScreenActor::~MockAutoEnrollmentCheckScreenActor() {
27 if (screen_)
28 screen_->OnActorDestroyed(this);
31 void MockAutoEnrollmentCheckScreenActor::SetDelegate(Delegate* screen) {
32 screen_ = screen;
33 MockSetDelegate(screen);
36 } // namespace chromeos