Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(781)

Unified Diff: gm/gm_json.py

Issue 19112002: svndiff.py: add ability to compare before-and-after JSON files, not just raw images (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: incorporate_feedback Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/jsondiff.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gm_json.py
===================================================================
--- gm/gm_json.py (revision 10016)
+++ gm/gm_json.py (working copy)
@@ -49,6 +49,10 @@
# Allowed hash types for test expectations.
JSONKEY_HASHTYPE_BITMAP_64BITMD5 = 'bitmap-64bitMD5'
+# Pattern used to assemble each image's filename
+IMAGE_FILENAME_PATTERN = '(\S+)_(\S+).png' # matches (testname, config)
borenet 2013/07/16 17:42:13 Any reason we can't just make this: IMAGE_FILENAME
epoger 2013/07/16 18:22:48 I think it's better to keep it as a pattern string
+
+
def LoadFromString(file_contents):
"""Loads the JSON summary written out by the GM tool.
Returns a dictionary keyed by the values listed as JSONKEY_ constants
« no previous file with comments | « no previous file | tools/jsondiff.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698