| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/enrollment/mock_auto_enrollment_check_sc
reen.h" | 5 #include "chrome/browser/chromeos/login/enrollment/mock_auto_enrollment_check_sc
reen.h" |
| 6 | 6 |
| 7 using ::testing::AtLeast; | 7 using ::testing::AtLeast; |
| 8 using ::testing::NotNull; | 8 using ::testing::NotNull; |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 MockAutoEnrollmentCheckScreen::MockAutoEnrollmentCheckScreen( | 12 MockAutoEnrollmentCheckScreen::MockAutoEnrollmentCheckScreen( |
| 13 BaseScreenDelegate* base_screen_delegate, | 13 BaseScreenDelegate* base_screen_delegate, |
| 14 AutoEnrollmentCheckScreenActor* actor) | 14 AutoEnrollmentCheckScreenView* view) |
| 15 : AutoEnrollmentCheckScreen(base_screen_delegate, actor) { | 15 : AutoEnrollmentCheckScreen(base_screen_delegate, view) {} |
| 16 } | |
| 17 | 16 |
| 18 MockAutoEnrollmentCheckScreen::~MockAutoEnrollmentCheckScreen() { } | 17 MockAutoEnrollmentCheckScreen::~MockAutoEnrollmentCheckScreen() { } |
| 19 | 18 |
| 20 MockAutoEnrollmentCheckScreenActor::MockAutoEnrollmentCheckScreenActor() | 19 MockAutoEnrollmentCheckScreenView::MockAutoEnrollmentCheckScreenView() |
| 21 : screen_(NULL) { | 20 : screen_(NULL) { |
| 22 EXPECT_CALL(*this, MockSetDelegate(NotNull())).Times(AtLeast(1)); | 21 EXPECT_CALL(*this, MockSetDelegate(NotNull())).Times(AtLeast(1)); |
| 23 } | 22 } |
| 24 | 23 |
| 25 | 24 MockAutoEnrollmentCheckScreenView::~MockAutoEnrollmentCheckScreenView() { |
| 26 MockAutoEnrollmentCheckScreenActor::~MockAutoEnrollmentCheckScreenActor() { | |
| 27 if (screen_) | 25 if (screen_) |
| 28 screen_->OnActorDestroyed(this); | 26 screen_->OnViewDestroyed(this); |
| 29 } | 27 } |
| 30 | 28 |
| 31 void MockAutoEnrollmentCheckScreenActor::SetDelegate(Delegate* screen) { | 29 void MockAutoEnrollmentCheckScreenView::SetDelegate(Delegate* screen) { |
| 32 screen_ = screen; | 30 screen_ = screen; |
| 33 MockSetDelegate(screen); | 31 MockSetDelegate(screen); |
| 34 } | 32 } |
| 35 | 33 |
| 36 } // namespace chromeos | 34 } // namespace chromeos |
| OLD | NEW |