testing/variations/PRESUBMIT.py
def _IsFieldTrialSizeBelowLimitOnWindows(input_api, file_path):
  """Checks whether the fieldtrial parameters exceeded the Windows cmd limit.

  When launching chrome, the fieldtrial related parameters take more than
  30,000 characters. Windows has a limit of 32767 characters on command
  line and thus it raises parameter error when the parameters are too long.
  Before we have a valid fix, we need to limit the number of fieldtrias in
  fieldtrial_testing_config.json to 31,500, from the fact that the
  non-fieldtrial parameters take roughly 1450 characters.
  See crbug.com/1045530 for more details.

  Args:
    input_api: An instance passed to presubmit scripts telling info about the
      changes.
    file_path: the absolute path to the json file with the fieldtrial configs.
  """
  sys.path.append(input_api.os_path.join(
      input_api.PresubmitLocalPath(), '..', '..', 'tools', 'variations'))
  import fieldtrial_util

  args = fieldtrial_util.GenerateArgs(file_path, 'windows')
  total_length = 0
  for arg in args:
    total_length += len(arg)
  return total_length < 31500
Checks whether the fieldtrial parameters exceeded the Windows cmd limit.

  When launching chrome, the fieldtrial related parameters take more than
  30,000 characters. Windows has a limit of 32767 characters on command
  line and thus it raises parameter error when the parameters are too long.
  Before we have a valid fix, we need to limit the number of fieldtrias in
  fieldtrial_testing_config.json to 31,500, from the fact that the
  non-fieldtrial parameters take roughly 1450 characters.
  See crbug.com/1045530 for more details.

  Args:
    input_api: An instance passed to presubmit scripts telling info about the
      changes.
    file_path: the absolute path to the json file with the fieldtrial configs.
  
Checks whether the fieldtrial parameters exceeded the Windows cmd limit.
When launching chrome, the fieldtrial related parameters take more than
30,000 characters. Windows has a limit of 32767 characters on command
line and thus it raises parameter error when the parameters are too long.
Before we have a valid fix, we need to limit the number of fieldtrias in
fieldtrial_testing_config.json to 31,500, from the fact that the
non-fieldtrial parameters take roughly 1450 characters.
See crbug.com/1045530 for more details.
Checks whether the fieldtrial parameters exceeded the Windows cmd limit . When launching chrome the fieldtrial related parameters take more than 30 000 characters . Windows has a limit of 32767 characters on command line and thus it raises parameter error when the parameters are too long . Before we have a valid fix we need to limit the number of fieldtrias in fieldtrial_testing_config . json to 31 500 from the fact that the non - fieldtrial parameters take roughly 1450 characters . See crbug . com / 1045530 for more details .
def _IsFieldTrialSizeBelowLimitOnWindows(input_api, file_path):
  sys.path.append(input_api.os_path.join(
      input_api.PresubmitLocalPath(), '..', '..', 'tools', 'variations'))
  import fieldtrial_util
  args = fieldtrial_util.GenerateArgs(file_path, 'windows')
  total_length = 0
  for arg in args:
    total_length += len(arg)
  return total_length < 31500
def _IsFieldTrialSizeBelowLimitOnWindows ( input_api , file_path ) : sys . path . append ( input_api . os_path . join ( input_api . PresubmitLocalPath ( ) , '..' , '..' , 'tools' , 'variations' ) ) import fieldtrial_util args = fieldtrial_util . GenerateArgs ( file_path , 'windows' ) total_length = 0 for arg in args : total_length += len ( arg ) return total_length < 31500
Checks whether the fieldtrial parameters exceeded the Windows cmd limit.
Checks whether the fieldtrial parameters exceeded the Windows cmd limit .
"""Checks whether the fieldtrial parameters exceeded the Windows cmd limit.

  When launching chrome, the fieldtrial related parameters take more than
  30,000 characters. Windows has a limit of 32767 characters on command
  line and thus it raises parameter error when the parameters are too long.
  Before we have a valid fix, we need to limit the number of fieldtrias in
  fieldtrial_testing_config.json to 31,500, from the fact that the
  non-fieldtrial parameters take roughly 1450 characters.
  See crbug.com/1045530 for more details.

  Args:
    input_api: An instance passed to presubmit scripts telling info about the
      changes.
    file_path: the absolute path to the json file with the fieldtrial configs.
  """
input_api
An instance passed to presubmit scripts telling info about the
changes.
An instance passed to presubmit scripts telling info about the changes .
file_path
the absolute path to the json file with the fieldtrial configs.
the absolute path to the json file with the fieldtrial configs .