Commit c5d75219 authored by Matt Reynolds's avatar Matt Reynolds Committed by Commit Bot

Fix mojom enums check in Feature Policy presubmit

The presubmit check reports an error when the feature policy enum is
modified: "*.json5 and *.mojom are out of sync"

This presubmit error is reported even when the files have identical
enum definitions due to a mistake in the error condition. Instead of
comparing the set of json5_enums with the mojom_source_path, compare
with the set of mojom_enums.

BUG=1105600

Change-Id: Ibc80ac41a37a2102e37edbbdbd6a8a77633051fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298225Reviewed-by: default avatarCharlie Hu <chenleihu@google.com>
Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Commit-Queue: Charlie Hu <chenleihu@google.com>
Cr-Commit-Position: refs/heads/master@{#788649}
parent 50017666
......@@ -131,7 +131,7 @@ def json5_config_checks_factory(mojom_source_path, json5_config_path,
mojom_messages = "{} are missing in mojom file.\n".format(
list(mojom_missing_enums)) if mojom_missing_enums else ""
return [] if json5_enums == mojom_source_path else [
return [] if json5_enums == mojom_enums else [
output_api.PresubmitPromptWarning(
"{} and {} are out of sync: {}{}".format(
json5_config_path, mojom_source_path, json5_messages,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment