summaryrefslogtreecommitdiff
path: root/action_processor_unittest.cc
diff options
context:
space:
mode:
authorDarin Petkov <petkov@chromium.org>2010-07-19 11:34:49 -0700
committerDarin Petkov <petkov@chromium.org>2010-07-19 11:34:49 -0700
commitc1a8b426be9542bc880923711ca508ea3f84000e (patch)
tree3e4ce19a90f8eb5caf7aaf7c44f3d89255e27e23 /action_processor_unittest.cc
parentcb319330c529b0394f6efb416dbe7b03bf38b19b (diff)
For actions, switch bool success into an exit code.
This way we can signal specific error conditions and then send appropriate events to Omaha from the UpdateAttempter. BUG=560 TEST=unit tests, gmerged and looked at logs Review URL: http://codereview.chromium.org/3022008
Diffstat (limited to 'action_processor_unittest.cc')
-rw-r--r--action_processor_unittest.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/action_processor_unittest.cc b/action_processor_unittest.cc
index 40275a03..7f391497 100644
--- a/action_processor_unittest.cc
+++ b/action_processor_unittest.cc
@@ -32,7 +32,7 @@ struct ActionProcessorTestAction : public Action<ActionProcessorTestAction> {
void PerformAction() {}
void CompleteAction() {
ASSERT_TRUE(processor());
- processor()->ActionComplete(this, true);
+ processor()->ActionComplete(this, kActionCodeSuccess);
}
string Type() const { return "ActionProcessorTestAction"; }
};
@@ -65,9 +65,10 @@ class MyActionProcessorDelegate : public ActionProcessorDelegate {
processing_done_called_(false),
processing_stopped_called_(false),
action_completed_called_(false),
- action_completed_success_(false) {}
+ action_exit_code_(kActionCodeError) {}
- virtual void ProcessingDone(const ActionProcessor* processor, bool success) {
+ virtual void ProcessingDone(const ActionProcessor* processor,
+ ActionExitCode code) {
EXPECT_EQ(processor_, processor);
EXPECT_FALSE(processing_done_called_);
processing_done_called_ = true;
@@ -79,18 +80,18 @@ class MyActionProcessorDelegate : public ActionProcessorDelegate {
}
virtual void ActionCompleted(ActionProcessor* processor,
AbstractAction* action,
- bool success) {
+ ActionExitCode code) {
EXPECT_EQ(processor_, processor);
EXPECT_FALSE(action_completed_called_);
action_completed_called_ = true;
- action_completed_success_ = success;
+ action_exit_code_ = code;
}
const ActionProcessor* processor_;
bool processing_done_called_;
bool processing_stopped_called_;
bool action_completed_called_;
- bool action_completed_success_;
+ ActionExitCode action_exit_code_;
};
} // namespace {}