Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Unified Diff: omaha_response_handler_action_unittest.cc

Issue 3521016: AU: Start checkpointing update progress. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: address review comments Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « omaha_response_handler_action.cc ('k') | prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « omaha_response_handler_action.cc ('k') | prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698