buffet: Add inheritance command parameters, progress and result
Redefinition of standard commands may omit parameters, progress or
result. In case if property is omitted, definition from base will be
used.
BUG=brillo:808
TEST=`FEATURES=test emerge-gizmo buffet`
Change-Id: I157b939d0ab6ccf16289c64720a2322378c9be32
Reviewed-on: https://chromium-review.googlesource.com/274232
Tested-by: Vitaly Buka <vitalybuka@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
diff --git a/buffet/commands/command_dictionary.cc b/buffet/commands/command_dictionary.cc
index 4f66c7d..2de0f36 100644
--- a/buffet/commands/command_dictionary.cc
+++ b/buffet/commands/command_dictionary.cc
@@ -196,6 +196,8 @@
const base::DictionaryValue* schema_def = nullptr;
if (!command_def_json->GetDictionaryWithoutPathExpansion(property_name,
&schema_def)) {
+ if (base_def)
+ return base_def->Clone();
return object_schema;
}