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

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

Issue 139553002: Revert of skpmaker: make the SKP slightly more interesting (add a border) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 # Manually verified: 640x400 red image with black border 43 "input.png" : [ "bitmap-64bitMD5", 12793741875005523433 ]
44 "input.png" : [ "bitmap-64bitMD5", 11092453015575919668 ] 44 }
45 } 45 }
46 } 46 }
47 }
48 self._assert_json_contents(output_json_path, expected_summary_dict) 47 self._assert_json_contents(output_json_path, expected_summary_dict)
49 48
50 def test_tiled_no_comparison(self): 49 def test_tiled_no_comparison(self):
51 """Generate individual tiles. 50 """Generate individual tiles.
52 51
53 TODO(epoger): The results of this test are currently broken! 52 TODO(epoger): The results of this test are currently broken!
54 The summary should contain a list of tiles, but for some reason, it is 53 The summary should contain a list of tiles, but for some reason, it is
55 empty.""" 54 empty."""
56 input_skp_path = os.path.join(self._temp_dir, 'input.skp') 55 input_skp_path = os.path.join(self._temp_dir, 'input.skp')
57 output_json_path = os.path.join(self._temp_dir, 'output.json') 56 output_json_path = os.path.join(self._temp_dir, 'output.json')
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 actual_dict = json.loads(file_contents) 118 actual_dict = json.loads(file_contents)
120 self.assertEqual(actual_dict, expected_dict) 119 self.assertEqual(actual_dict, expected_dict)
121 120
122 121
123 def main(): 122 def main():
124 base_unittest.main(RenderPicturesTest) 123 base_unittest.main(RenderPicturesTest)
125 124
126 125
127 if __name__ == '__main__': 126 if __name__ == '__main__':
128 main() 127 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