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

Unified Diff: omaha_response_handler_action_unittest.cc

Issue 3022008: For actions, switch bool success into an exit code. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: switch to all positive error codes. Created 10 years, 5 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') | postinstall_runner_action.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 f751bbe95f877c15094495b0cef534e0e4faa404..90cbed9108bd3bd02c5fe8baaae3c4966b7ad2ad 100644
--- a/omaha_response_handler_action_unittest.cc
+++ b/omaha_response_handler_action_unittest.cc
@@ -25,18 +25,18 @@ class OmahaResponseHandlerActionProcessorDelegate
: public ActionProcessorDelegate {
public:
OmahaResponseHandlerActionProcessorDelegate()
- : success_(false),
- success_set_(false) {}
+ : code_(kActionCodeError),
+ code_set_(false) {}
void ActionCompleted(ActionProcessor* processor,
AbstractAction* action,
- bool success) {
+ ActionExitCode code) {
if (action->Type() == OmahaResponseHandlerAction::StaticType()) {
- success_ = success;
- success_set_ = true;
+ code_ = code;
+ code_set_ = true;
}
}
- bool success_;
- bool success_set_;
+ ActionExitCode code_;
+ bool code_set_;
};
namespace {
@@ -73,8 +73,8 @@ bool OmahaResponseHandlerActionTest::DoTest(const OmahaResponse& in,
<< "Update test to handle non-asynch actions";
if (out)
*out = collector_action.object();
- EXPECT_TRUE(delegate.success_set_);
- return delegate.success_;
+ EXPECT_TRUE(delegate.code_set_);
+ return delegate.code_ == kActionCodeSuccess;
}
TEST_F(OmahaResponseHandlerActionTest, SimpleTest) {
« no previous file with comments | « omaha_response_handler_action.cc ('k') | postinstall_runner_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698