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

Side by Side Diff: chrome/app/theme/PRESUBMIT.py

Issue 1372113003: Add a PRESUBMIT check for broken .ico files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@optimize-ico-files-modularize
Patch Set: Update copyright year. Created 4 years, 1 month 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 | « no previous file | tools/resources/ico_tools.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Presubmit script for Chromium theme resources. 5 """Presubmit script for Chromium theme resources.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into depot_tools, and see 8 for more details about the presubmit API built into depot_tools, and see
9 http://www.chromium.org/developers/web-development-style-guide for the rules 9 http://www.chromium.org/developers/web-development-style-guide for the rules
10 we're checking against here. 10 we're checking against here.
(...skipping 18 matching lines...) Expand all
29 # that the images modified in one are the correct scale of the other. 29 # that the images modified in one are the correct scale of the other.
30 path_scales = [ 30 path_scales = [
31 [(100, 'default_100_percent/'), (200, 'default_200_percent/')], 31 [(100, 'default_100_percent/'), (200, 'default_200_percent/')],
32 ] 32 ]
33 33
34 import sys 34 import sys
35 old_path = sys.path 35 old_path = sys.path
36 36
37 try: 37 try:
38 sys.path = [resources] + old_path 38 sys.path = [resources] + old_path
39 from resource_check import resource_scale_factors 39 from resource_check import resource_scale_factors, ico_files
40 40
41 for paths in path_scales: 41 for paths in path_scales:
42 results.extend(resource_scale_factors.ResourceScaleFactors( 42 results.extend(resource_scale_factors.ResourceScaleFactors(
43 input_api, output_api, paths).RunChecks()) 43 input_api, output_api, paths).RunChecks())
44
45 results.extend(ico_files.IcoFiles(input_api, output_api).RunChecks())
44 finally: 46 finally:
45 sys.path = old_path 47 sys.path = old_path
46 48
47 return results 49 return results
OLDNEW
« no previous file with comments | « no previous file | tools/resources/ico_tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698