| OLD | NEW | 
|---|
| 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 browser resources. | 5 """Presubmit script for Chromium browser 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 gcl/git cl, 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. | 
| 11 """ | 11 """ | 
| 12 | 12 | 
| 13 | 13 | 
| 14 import os | 14 import os | 
| 15 import struct | 15 import struct | 
| 16 | 16 | 
| 17 | 17 | 
| 18 class InvalidPNGException(Exception): | 18 class InvalidPNGException(Exception): | 
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 113             ('width', 'height'), base_dimensions, scaled_dimensions): | 113             ('width', 'height'), base_dimensions, scaled_dimensions): | 
| 114           valid_sizes = ValidSizes(base_size, self.paths[i][0]) | 114           valid_sizes = ValidSizes(base_size, self.paths[i][0]) | 
| 115           if scaled_size not in valid_sizes: | 115           if scaled_size not in valid_sizes: | 
| 116             results.append(self.output_api.PresubmitError( | 116             results.append(self.output_api.PresubmitError( | 
| 117                 'Image %s has %s %d, expected to be %s' % ( | 117                 'Image %s has %s %d, expected to be %s' % ( | 
| 118                 self.input_api.os_path.join(repository_path, image_path), | 118                 self.input_api.os_path.join(repository_path, image_path), | 
| 119                 dimension_name, | 119                 dimension_name, | 
| 120                 scaled_size, | 120                 scaled_size, | 
| 121                 ' or '.join(map(str, valid_sizes))))) | 121                 ' or '.join(map(str, valid_sizes))))) | 
| 122     return results | 122     return results | 
| OLD | NEW | 
|---|