chrome/app/theme/PRESUBMIT.py
def _CommonChecks(input_api, output_api):
  """Checks common to both upload and commit."""
  results = []
  resources = input_api.os_path.join(input_api.PresubmitLocalPath(),
      '../../../ui/resources')

  # List of paths with their associated scale factor. This is used to verify
  # that the images modified in one are the correct scale of the other.
  path_scales = [
    [(100, 'default_100_percent/'), (200, 'default_200_percent/')],
  ]

  import sys
  old_path = sys.path

  try:
    sys.path = [resources] + old_path
    from resource_check import resource_scale_factors, ico_files

    for paths in path_scales:
      results.extend(resource_scale_factors.ResourceScaleFactors(
          input_api, output_api, paths).RunChecks())

    results.extend(ico_files.IcoFiles(input_api, output_api).RunChecks())
  finally:
    sys.path = old_path

  return results
Checks common to both upload and commit.
Checks common to both upload and commit.
Checks common to both upload and commit .
def _CommonChecks(input_api, output_api):
  results = []
  resources = input_api.os_path.join(input_api.PresubmitLocalPath(),
      '../../../ui/resources')
  path_scales = [
    [(100, 'default_100_percent/'), (200, 'default_200_percent/')],
  ]
  import sys
  old_path = sys.path
  try:
    sys.path = [resources] + old_path
    from resource_check import resource_scale_factors, ico_files
    for paths in path_scales:
      results.extend(resource_scale_factors.ResourceScaleFactors(
          input_api, output_api, paths).RunChecks())
    results.extend(ico_files.IcoFiles(input_api, output_api).RunChecks())
  finally:
    sys.path = old_path
  return results
def _CommonChecks ( input_api , output_api ) : results = [ ] resources = input_api . os_path . join ( input_api . PresubmitLocalPath ( ) , '../../../ui/resources' ) path_scales = [ [ ( 100 , 'default_100_percent/' ) , ( 200 , 'default_200_percent/' ) ] , ] import sys old_path = sys . path try : sys . path = [ resources ] + old_path from resource_check import resource_scale_factors , ico_files for paths in path_scales : results . extend ( resource_scale_factors . ResourceScaleFactors ( input_api , output_api , paths ) . RunChecks ( ) ) results . extend ( ico_files . IcoFiles ( input_api , output_api ) . RunChecks ( ) ) finally : sys . path = old_path return results
Checks common to both upload and commit.
Checks common to both upload and commit .
"""Checks common to both upload and commit.""" # List of paths with their associated scale factor. This is used to verify # that the images modified in one are the correct scale of the other.
input_api
output_api