chrome/android/webapk/PRESUBMIT.py
def _CheckChromeUpdateTriggerRule(input_api, output_api):
  """
  Check that if |expected_shell_apk_version| is updated it is the only
  change in the CL.
  """
  if _CheckVersionVariableChanged(input_api,
                                  REQUEST_UPDATE_FOR_VERSION_LOCAL_PATH,
                                  REQUEST_UPDATE_FOR_VERSION_VARIABLE):
    if (len(input_api.AffectedFiles()) != 1 or
        len(input_api.AffectedFiles[0].ChangedContents()) != 1):
      return [
        output_api.PresubmitError(
            '{} in {} must be updated in a standalone CL.'.format(
                REQUEST_UPDATE_FOR_VERSION_VARIABLE,
                REQUEST_UPDATE_FOR_VERSION_LOCAL_PATH))
        ]
  return []

  Check that if |expected_shell_apk_version| is updated it is the only
  change in the CL.
  
Check that if |expected_shell_apk_version| is updated it is the only
change in the CL.
Check that if |expected_shell_apk_version| is updated it is the only change in the CL .
def _CheckChromeUpdateTriggerRule(input_api, output_api):
  if _CheckVersionVariableChanged(input_api,
                                  REQUEST_UPDATE_FOR_VERSION_LOCAL_PATH,
                                  REQUEST_UPDATE_FOR_VERSION_VARIABLE):
    if (len(input_api.AffectedFiles()) != 1 or
        len(input_api.AffectedFiles[0].ChangedContents()) != 1):
      return [
        output_api.PresubmitError(
            '{} in {} must be updated in a standalone CL.'.format(
                REQUEST_UPDATE_FOR_VERSION_VARIABLE,
                REQUEST_UPDATE_FOR_VERSION_LOCAL_PATH))
        ]
  return []
def _CheckChromeUpdateTriggerRule ( input_api , output_api ) : if _CheckVersionVariableChanged ( input_api , REQUEST_UPDATE_FOR_VERSION_LOCAL_PATH , REQUEST_UPDATE_FOR_VERSION_VARIABLE ) : if ( len ( input_api . AffectedFiles ( ) ) != 1 or len ( input_api . AffectedFiles [ 0 ] . ChangedContents ( ) ) != 1 ) : return [ output_api . PresubmitError ( '{} in {} must be updated in a standalone CL.' . format ( REQUEST_UPDATE_FOR_VERSION_VARIABLE , REQUEST_UPDATE_FOR_VERSION_LOCAL_PATH ) ) ] return [ ]
Check that if |expected_shell_apk_version| is updated it is the only
change in the CL.
Check that if |expected_shell_apk_version| is updated it is the only change in the CL .
"""
  Check that if |expected_shell_apk_version| is updated it is the only
  change in the CL.
  """
input_api
output_api