rebaseline.py: add --bugs and --unreviewed flags
BUG=skia:1569
R=borenet@google.com
Review URL: https://codereview.chromium.org/23478011
git-svn-id: http://skia.googlecode.com/svn/trunk@11058 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gm_json.py b/gm/gm_json.py
index 44ec5ea..c2a01f1 100644
--- a/gm/gm_json.py
+++ b/gm/gm_json.py
@@ -21,31 +21,57 @@
# These constants must be kept in sync with the kJsonKey_ constants in
# gm_expectations.cpp !
+
JSONKEY_ACTUALRESULTS = 'actual-results'
+
# Tests whose results failed to match expectations.
JSONKEY_ACTUALRESULTS_FAILED = 'failed'
+
# Tests whose results failed to match expectations, but IGNOREFAILURE causes
# us to take them less seriously.
JSONKEY_ACTUALRESULTS_FAILUREIGNORED = 'failure-ignored'
+
# Tests for which we do not have any expectations. They may be new tests that
# we haven't had a chance to check in expectations for yet, or we may have
# consciously decided to leave them without expectations because we are unhappy
# with the results (although we should try to move away from that, and instead
# check in expectations with the IGNOREFAILURE flag set).
JSONKEY_ACTUALRESULTS_NOCOMPARISON = 'no-comparison'
+
# Tests whose results matched their expectations.
JSONKEY_ACTUALRESULTS_SUCCEEDED = 'succeeded'
+
JSONKEY_EXPECTEDRESULTS = 'expected-results'
+
# One or more [HashType/DigestValue] pairs representing valid results for this
# test. Typically, there will just be one pair, but we allow for multiple
# expectations, and the test will pass if any one of them is matched.
JSONKEY_EXPECTEDRESULTS_ALLOWEDDIGESTS = 'allowed-digests'
+
+# Optional: one or more integers listing Skia bugs (under
+# https://code.google.com/p/skia/issues/list ) that pertain to this expectation.
+JSONKEY_EXPECTEDRESULTS_BUGS = 'bugs'
+
# If IGNOREFAILURE is set to True, a failure of this test will be reported
# within the FAILUREIGNORED section (thus NOT causing the buildbots to go red)
# rather than the FAILED section (which WOULD cause the buildbots to go red).
JSONKEY_EXPECTEDRESULTS_IGNOREFAILURE = 'ignore-failure'
+# Optional: a free-form text string with human-readable information about
+# this expectation.
+JSONKEY_EXPECTEDRESULTS_NOTES = 'notes'
+
+# Optional: boolean indicating whether this expectation was reviewed/approved
+# by a human being.
+# If True: a human looked at this image and approved it.
+# If False: this expectation was committed blind. (In such a case, please
+# add notes indicating why!)
+# If absent: this expectation was committed by a tool that didn't enforce human
+# review of expectations.
+JSONKEY_EXPECTEDRESULTS_REVIEWED = 'reviewed-by-human'
+
+
# Allowed hash types for test expectations.
JSONKEY_HASHTYPE_BITMAP_64BITMD5 = 'bitmap-64bitMD5'