Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / mock_update_screen.cc
blob02da115ddc08645031cd73fafb367f9b7c095bdf
1 // Copyright (c) 2011 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/screens/mock_update_screen.h"
7 using ::testing::AtLeast;
8 using ::testing::_;
10 namespace chromeos {
12 MockUpdateScreen::MockUpdateScreen(BaseScreenDelegate* base_screen_delegate,
13 UpdateView* view)
14 : UpdateScreen(base_screen_delegate, view, NULL) {
17 MockUpdateScreen::~MockUpdateScreen() {
20 MockUpdateView::MockUpdateView() : model_(nullptr) {
21 EXPECT_CALL(*this, MockBind(_)).Times(AtLeast(1));
24 MockUpdateView::~MockUpdateView() {
25 if (model_)
26 model_->OnViewDestroyed(this);
29 void MockUpdateView::Bind(UpdateModel& model) {
30 model_ = &model;
31 MockBind(model);
34 void MockUpdateView::Unbind() {
35 model_ = nullptr;
36 MockUnbind();
39 } // namespace chromeos