blob: 13017b92a41d7823af5d7d7fda83d00421b0e751 [file] [log] [blame]
Jay Srinivasan55f50c22013-01-10 19:24:35 -08001// Copyright (c) 2012 The Chromium OS 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 "update_engine/mock_system_state.h"
6#include "update_engine/update_attempter_mock.h"
7
8namespace chromeos_update_engine {
9
10// Mock the SystemStateInterface so that we could lie that
11// OOBE is completed even when there's no such marker file, etc.
12MockSystemState::MockSystemState() : prefs_(&mock_prefs_) {
13 mock_payload_state_.Initialize(&mock_prefs_);
14 mock_gpio_handler_ = new testing::NiceMock<MockGpioHandler>();
15 mock_update_attempter_ = new testing::NiceMock<UpdateAttempterMock>(
16 this, &dbus_);
17}
18
19MockSystemState::~MockSystemState() {
20 delete mock_gpio_handler_;
21}
22
23UpdateAttempter* MockSystemState::update_attempter() {
24 return mock_update_attempter_;
25}
26
27} // namespeace chromeos_update_engine
28