buffet: Fixed command state spelling for "cancelled" GCD spec apparently expects the command status to be spelled as "cancelled". Fixed... BUG=brillo:552 TEST=`FEATURES=test emerge-link buffet` Change-Id: I11a848f2f29ca7d63ce95d130b2a84aa75ced7fd Reviewed-on: https://chromium-review.googlesource.com/260028 Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org> Reviewed-by: Christopher Wiley <wiley@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/commands/command_instance.cc b/buffet/commands/command_instance.cc index 7d54ed7..d39e4a1 100644 --- a/buffet/commands/command_instance.cc +++ b/buffet/commands/command_instance.cc
@@ -22,7 +22,7 @@ const char CommandInstance::kStatusPaused[] = "paused"; const char CommandInstance::kStatusError[] = "error"; const char CommandInstance::kStatusDone[] = "done"; -const char CommandInstance::kStatusCanceled[] = "canceled"; +const char CommandInstance::kStatusCancelled[] = "cancelled"; const char CommandInstance::kStatusAborted[] = "aborted"; const char CommandInstance::kStatusExpired[] = "expired"; @@ -182,7 +182,7 @@ } void CommandInstance::Cancel() { - SetStatus(kStatusCanceled); + SetStatus(kStatusCancelled); RemoveFromQueue(); // The command will be destroyed after that, so do not access any members. }
diff --git a/buffet/commands/command_instance.h b/buffet/commands/command_instance.h index b3bd2e0..45cf485 100644 --- a/buffet/commands/command_instance.h +++ b/buffet/commands/command_instance.h
@@ -99,7 +99,7 @@ static const char kStatusPaused[]; static const char kStatusError[]; static const char kStatusDone[]; - static const char kStatusCanceled[]; + static const char kStatusCancelled[]; static const char kStatusAborted[]; static const char kStatusExpired[];
diff --git a/buffet/commands/dbus_command_proxy_unittest.cc b/buffet/commands/dbus_command_proxy_unittest.cc index e750ddb..ff351ba 100644 --- a/buffet/commands/dbus_command_proxy_unittest.cc +++ b/buffet/commands/dbus_command_proxy_unittest.cc
@@ -195,7 +195,7 @@ TEST_F(DBusCommandProxyTest, Cancel) { EXPECT_CALL(*mock_exported_object_command_, SendSignal(_)).Times(1); GetCommandInterface()->Cancel(); - EXPECT_EQ(CommandInstance::kStatusCanceled, + EXPECT_EQ(CommandInstance::kStatusCancelled, GetCommandAdaptor()->GetStatus()); }