blob: 8c5ffc98eb572a937fd69cfcd5f7f49bd0ffaf38 [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
Gilad Arnold5bb4c902014-04-10 12:32:13 -07005#include "update_engine/fake_system_state.h"
Alex Deymo63784a52014-05-28 10:46:14 -07006#include "update_engine/update_manager/fake_state.h"
Jay Srinivasan55f50c22013-01-10 19:24:35 -08007
Alex Deymo63784a52014-05-28 10:46:14 -07008using chromeos_update_manager::FakeState;
Alex Deymo94c06162014-03-21 20:34:46 -07009
Jay Srinivasan55f50c22013-01-10 19:24:35 -080010namespace chromeos_update_engine {
11
12// Mock the SystemStateInterface so that we could lie that
13// OOBE is completed even when there's no such marker file, etc.
Gilad Arnold5bb4c902014-04-10 12:32:13 -070014FakeSystemState::FakeSystemState()
Gilad Arnold1f847232014-04-07 12:07:49 -070015 : mock_connection_manager_(this),
16 mock_update_attempter_(this, &dbus_),
17 default_request_params_(this),
Alex Deymo63784a52014-05-28 10:46:14 -070018 fake_update_manager_(&fake_clock_),
Gilad Arnold1f847232014-04-07 12:07:49 -070019 clock_(&fake_clock_),
20 connection_manager_(&mock_connection_manager_),
21 hardware_(&fake_hardware_),
22 metrics_lib_(&mock_metrics_lib_),
Chris Sosaaa18e162013-06-20 13:20:30 -070023 prefs_(&mock_prefs_),
David Zeuthen526cb582013-08-06 12:26:18 -070024 powerwash_safe_prefs_(&mock_powerwash_safe_prefs_),
Alex Deymo94c06162014-03-21 20:34:46 -070025 payload_state_(&mock_payload_state_),
Gilad Arnold1f847232014-04-07 12:07:49 -070026 update_attempter_(&mock_update_attempter_),
27 request_params_(&default_request_params_),
28 p2p_manager_(&mock_p2p_manager_),
Alex Deymo63784a52014-05-28 10:46:14 -070029 update_manager_(&fake_update_manager_),
Gilad Arnold1f847232014-04-07 12:07:49 -070030 device_policy_(nullptr),
31 fake_system_rebooted_(false) {
Jay Srinivasan19409b72013-04-12 19:23:36 -070032 mock_payload_state_.Initialize(this);
Gilad Arnold1f847232014-04-07 12:07:49 -070033 mock_update_attempter_.Init();
Jay Srinivasan55f50c22013-01-10 19:24:35 -080034}
35
Alex Deymo94c06162014-03-21 20:34:46 -070036} // namespace chromeos_update_engine