diff options
author | haruki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 09:40:42 +0000 |
---|---|---|
committer | haruki@chromium.org <haruki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-09 09:40:42 +0000 |
commit | aca6db0af1710c3ebada95bb1e0b3c4889a9f5d7 (patch) | |
tree | 5603c8bc11dc6926728bf8964e3fb90e9525d585 /chromeos/dbus/fake_update_engine_client.cc | |
parent | 5697a1d251aa22b5f0d1c55249c1c7dbfd4cb336 (diff) | |
download | chromium_src-aca6db0af1710c3ebada95bb1e0b3c4889a9f5d7.zip chromium_src-aca6db0af1710c3ebada95bb1e0b3c4889a9f5d7.tar.gz chromium_src-aca6db0af1710c3ebada95bb1e0b3c4889a9f5d7.tar.bz2 |
Use MockDBusThreadManagerWithoutGMock for UpdateScreenTest
BUG=239333
TEST=trybots
R=satorux@chromium.org
Review URL: https://codereview.chromium.org/15082003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/fake_update_engine_client.cc')
-rw-r--r-- | chromeos/dbus/fake_update_engine_client.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chromeos/dbus/fake_update_engine_client.cc b/chromeos/dbus/fake_update_engine_client.cc index aee8c37..36618f8 100644 --- a/chromeos/dbus/fake_update_engine_client.cc +++ b/chromeos/dbus/fake_update_engine_client.cc @@ -6,7 +6,9 @@ namespace chromeos { -FakeUpdateEngineClient::FakeUpdateEngineClient() { +FakeUpdateEngineClient::FakeUpdateEngineClient() + : update_check_result_(UpdateEngineClient::UPDATE_RESULT_SUCCESS), + reboot_after_update_call_count_(0) { } FakeUpdateEngineClient::~FakeUpdateEngineClient() { @@ -24,9 +26,11 @@ bool FakeUpdateEngineClient::HasObserver(Observer* observer) { void FakeUpdateEngineClient::RequestUpdateCheck( const UpdateCheckCallback& callback) { + callback.Run(update_check_result_); } void FakeUpdateEngineClient::RebootAfterUpdate() { + reboot_after_update_call_count_++; } void FakeUpdateEngineClient::SetReleaseTrack(const std::string& track) { @@ -45,4 +49,9 @@ void FakeUpdateEngineClient::set_update_engine_client_status( update_engine_client_status_ = status; } +void FakeUpdateEngineClient::set_update_check_result( + const UpdateEngineClient::UpdateCheckResult& result) { + update_check_result_ = result; +} + } // namespace chromeos |