Index: omaha_response_handler_action_unittest.cc |
diff --git a/omaha_response_handler_action_unittest.cc b/omaha_response_handler_action_unittest.cc |
index 90cbed9108bd3bd02c5fe8baaae3c4966b7ad2ad..10be7d6d5ec78ad78ca6ba9637c8f1c1f6712c94 100644 |
--- a/omaha_response_handler_action_unittest.cc |
+++ b/omaha_response_handler_action_unittest.cc |
@@ -1,14 +1,18 @@ |
-// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
#include <string> |
+ |
#include <gtest/gtest.h> |
+ |
#include "update_engine/omaha_response_handler_action.h" |
+#include "update_engine/prefs_mock.h" |
#include "update_engine/test_utils.h" |
#include "update_engine/utils.h" |
using std::string; |
+using testing::Return; |
namespace chromeos_update_engine { |
@@ -60,7 +64,12 @@ bool OmahaResponseHandlerActionTest::DoTest(const OmahaResponse& in, |
ObjectFeederAction<OmahaResponse> feeder_action; |
feeder_action.set_obj(in); |
- OmahaResponseHandlerAction response_handler_action; |
+ PrefsMock prefs; |
+ if (in.update_exists) { |
+ EXPECT_CALL(prefs, SetString(kPrefsUpdateCheckResponseHash, in.hash)) |
+ .WillOnce(Return(true)); |
+ } |
+ OmahaResponseHandlerAction response_handler_action(&prefs); |
response_handler_action.set_boot_device(boot_dev); |
BondActions(&feeder_action, &response_handler_action); |
ObjectCollectorAction<InstallPlan> collector_action; |