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

Side by Side Diff: tools/tests/render_pictures_test.py

Issue 139583002: [try 2] skpmaker: make the SKP more graphically interesting (add a border) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: original CL Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « tools/skpmaker.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2014 Google Inc. 4 Copyright 2014 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 Test the render_pictures binary. 9 Test the render_pictures binary.
10 """ 10 """
(...skipping 22 matching lines...) Expand all
33 output_json_path = os.path.join(self._temp_dir, 'output.json') 33 output_json_path = os.path.join(self._temp_dir, 'output.json')
34 self._run_skpmaker(['--writePath', input_skp_path]) 34 self._run_skpmaker(['--writePath', input_skp_path])
35 self._run_render_pictures(['-r', input_skp_path, 35 self._run_render_pictures(['-r', input_skp_path,
36 '--bbh', 'grid', '256', '256', 36 '--bbh', 'grid', '256', '256',
37 '--mode', 'tile', '256', '256', 37 '--mode', 'tile', '256', '256',
38 '--writeJsonSummaryPath', output_json_path, 38 '--writeJsonSummaryPath', output_json_path,
39 '--writeWholeImage']) 39 '--writeWholeImage'])
40 expected_summary_dict = { 40 expected_summary_dict = {
41 "actual-results" : { 41 "actual-results" : {
42 "no-comparison" : { 42 "no-comparison" : {
43 "input.png" : [ "bitmap-64bitMD5", 12793741875005523433 ] 43 # Manually verified: 640x400 red image with black border
44 } 44 "input.png" : [ "bitmap-64bitMD5", 11092453015575919668 ]
45 } 45 }
46 } 46 }
47 }
47 self._assert_json_contents(output_json_path, expected_summary_dict) 48 self._assert_json_contents(output_json_path, expected_summary_dict)
48 49
49 def test_tiled_no_comparison(self): 50 def test_tiled_no_comparison(self):
50 """Generate individual tiles. 51 """Generate individual tiles.
51 52
52 TODO(epoger): The results of this test are currently broken! 53 TODO(epoger): The results of this test are currently broken!
53 The summary should contain a list of tiles, but for some reason, it is 54 The summary should contain a list of tiles, but for some reason, it is
54 empty.""" 55 empty."""
55 input_skp_path = os.path.join(self._temp_dir, 'input.skp') 56 input_skp_path = os.path.join(self._temp_dir, 'input.skp')
56 output_json_path = os.path.join(self._temp_dir, 'output.json') 57 output_json_path = os.path.join(self._temp_dir, 'output.json')
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 actual_dict = json.loads(file_contents) 119 actual_dict = json.loads(file_contents)
119 self.assertEqual(actual_dict, expected_dict) 120 self.assertEqual(actual_dict, expected_dict)
120 121
121 122
122 def main(): 123 def main():
123 base_unittest.main(RenderPicturesTest) 124 base_unittest.main(RenderPicturesTest)
124 125
125 126
126 if __name__ == '__main__': 127 if __name__ == '__main__':
127 main() 128 main()
OLDNEW
« no previous file with comments | « tools/skpmaker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698