Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 1 | // 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 Arnold | 5bb4c90 | 2014-04-10 12:32:13 -0700 | [diff] [blame^] | 5 | #include "update_engine/fake_system_state.h" |
Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 6 | #include "update_engine/policy_manager/fake_state.h" |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 7 | |
Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 8 | using chromeos_policy_manager::FakeState; |
| 9 | |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 10 | namespace 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 Arnold | 5bb4c90 | 2014-04-10 12:32:13 -0700 | [diff] [blame^] | 14 | FakeSystemState::FakeSystemState() |
Gilad Arnold | 1f84723 | 2014-04-07 12:07:49 -0700 | [diff] [blame] | 15 | : 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 Sosa | aa18e16 | 2013-06-20 13:20:30 -0700 | [diff] [blame] | 22 | prefs_(&mock_prefs_), |
David Zeuthen | 526cb58 | 2013-08-06 12:26:18 -0700 | [diff] [blame] | 23 | powerwash_safe_prefs_(&mock_powerwash_safe_prefs_), |
Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 24 | payload_state_(&mock_payload_state_), |
Gilad Arnold | 1f84723 | 2014-04-07 12:07:49 -0700 | [diff] [blame] | 25 | 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 Srinivasan | 19409b7 | 2013-04-12 19:23:36 -0700 | [diff] [blame] | 32 | mock_payload_state_.Initialize(this); |
Gilad Arnold | 1f84723 | 2014-04-07 12:07:49 -0700 | [diff] [blame] | 33 | mock_update_attempter_.Init(); |
Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 34 | fake_policy_manager_.Init(FakeState::Construct()); |
Jay Srinivasan | 55f50c2 | 2013-01-10 19:24:35 -0800 | [diff] [blame] | 35 | } |
| 36 | |
Alex Deymo | 94c0616 | 2014-03-21 20:34:46 -0700 | [diff] [blame] | 37 | } // namespace chromeos_update_engine |