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