blob: a4fbbebd2638077ce759a644f9c15d8c44aa3eef [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 Deymo94c06162014-03-21 20:34:46 -07006#include "update_engine/policy_manager/fake_state.h"
Jay Srinivasan55f50c22013-01-10 19:24:35 -08007
Alex Deymo94c06162014-03-21 20:34:46 -07008using chromeos_policy_manager::FakeState;
9
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),
18 clock_(&fake_clock_),
19 connection_manager_(&mock_connection_manager_),
20 hardware_(&fake_hardware_),
21 metrics_lib_(&mock_metrics_lib_),
Chris Sosaaa18e162013-06-20 13:20:30 -070022 prefs_(&mock_prefs_),
David Zeuthen526cb582013-08-06 12:26:18 -070023 powerwash_safe_prefs_(&mock_powerwash_safe_prefs_),
Alex Deymo94c06162014-03-21 20:34:46 -070024 payload_state_(&mock_payload_state_),
Gilad Arnold1f847232014-04-07 12:07:49 -070025 gpio_handler_(&mock_gpio_handler_),
26 update_attempter_(&mock_update_attempter_),
27 request_params_(&default_request_params_),
28 p2p_manager_(&mock_p2p_manager_),
29 policy_manager_(&fake_policy_manager_),
30 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();
Alex Deymo94c06162014-03-21 20:34:46 -070034 fake_policy_manager_.Init(FakeState::Construct());
Jay Srinivasan55f50c22013-01-10 19:24:35 -080035}
36
Alex Deymo94c06162014-03-21 20:34:46 -070037} // namespace chromeos_update_engine