def METHOD_NAME(args):
  """Run Javascript unit tests. Here are the steps:
     1. Execute the HTML with chromedriver.
     2. Read the test result from the HTML."""
  test_filepath = os.path.join('src', 'appengine', 'private', 'test.html')
  print('Running chromedriver on %s' % test_filepath)
  chrome_options = webdriver.ChromeOptions()
  chrome_options.add_argument('--allow-file-access-from-files')
  is_ci = os.getenv('TEST_BOT_ENVIRONMENT')
  if is_ci:
    # Turn off sandbox since running under root, with trusted tests.
    chrome_options.add_argument('--no-sandbox')
    chrome_options.add_argument('--headless')
  driver = webdriver.Chrome(
      executable_path=common.get_chromedriver_path(),
      chrome_options=chrome_options)
  try:
    driver.get('file://%s' % os.path.abspath(test_filepath))
    # Wait for tests to be completed.
    while True:
      success_count = driver.execute_script(
          'return WCT._reporter.stats.passes;')
      failure_count = driver.execute_script(
          'return WCT._reporter.stats.failures;')
      sys.stdout.write(
          '\rSuccess: %d, Failure: %d' % (success_count, failure_count))
      sys.stdout.flush()
      is_complete = driver.execute_script('return WCT._reporter.complete;')
      if is_complete:
        break
      time.sleep(0.1)
    sys.stdout.write('\r' + (' ' * 70))
    sys.stdout.flush()
    success_count = int(
        driver.find_element_by_css_selector('#mocha-stats .passes em').text)
    failure_count = int(
        driver.find_element_by_css_selector('#mocha-stats .failures em').text)
    error_report = _parse_error_report(driver)
    if error_report:
      print(error_report)
    print()
    print(_SUITE_SEPARATOR)
    print('Test results:')
    print('| Success: %d' % success_count)
    print('| Failure: %d' % failure_count)
    print(_SUITE_SEPARATOR)
    print()
    if args.persist:
      # pylint: disable=eval-used
      eval(
          input('--persist is used. Leave the browser open.'
                ' Press ENTER to close it:'))
  finally:
    driver.quit()
  if failure_count > 0:
    sys.exit(1)