chromium/chrome/browser/resources/chromeos/accessibility/BUILD.gn

# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
import("//chrome/browser/resources/accessibility/tools/manifest.gni")
import("//chrome/common/features.gni")
import("//chrome/test/base/ash/js2gtest.gni")
import("//tools/typescript/ts_library.gni")
import("strings/accessibility_strings.gni")
import("tools/run_jsbundler.gni")

assert(is_chromeos_ash)

accessibility_out_dir = "$root_out_dir/resources/chromeos/accessibility/"

group("build") {
  deps = [
    ":accessibility_strings",
    ":chromevox_manifests",
    "braille_ime:build",
    "chromevox:build",
    "common:build",
  ]
  if (is_chromeos_ash) {
    deps += [
      ":accessibility_common_manifests",
      ":enhanced_network_tts_manifests",
      ":select_to_speak_manifests",
      ":switch_access_manifests",
      "accessibility_common:build",
      "enhanced_network_tts:build",
      "select_to_speak:build",
      "switch_access:build",
    ]
  }
}

manifest_variants("accessibility_common_manifests") {
  input_file = "accessibility_common_manifest.json.jinja2"
  output_dir = accessibility_out_dir
  output_name = "accessibility_common_manifest"
  key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC6SX/t6kDEi9UiG4fULwjbEW1uJmQoiJPtxvSZ/SDH14OjSzmfP6xfE97Hus3EY8uSIMxTHkGaZliGbFbIQXQn6/XwBpQRu2gPlrfz7TWR1Hw6SboBBMOpltM9A2nx+d3jLtz+YtKNYVcHyNil9hXfFeyFe6g5kLHapKb1UO0jo3q3kovo1a1z7ujzGwogfLmb58w1hkdFBnnqumRlT55dKLN8AQ6cSdB1sjDVoMgPYeWgkzXr9cR3A8UVJookSO0sDAmD+W8BtBijapt3UVkHiIL1NTPuXvGGUHL7TPFo5WcBXFMkTz74gJqqFdO5hQ2YWXAaCxQJwgJrQPrvPMSJAgMBAAECggEADDhEDww9wWbWzUz3BQEs2In1HrOgAFStN3zEkNFc9B78AJsvpXWczgPUqk9jrg1Jzk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2l13MpCn8cBZgrfpQg2slP1dz8LCDW/PB+6MF7qwEHN2afVA2muQaez+q0eXZjMXmGJ3VZIXz/cxBLD6"
  make_guest = true
  make_v3 = true
}

manifest_variants("chromevox_manifests") {
  input_file = "chromevox_manifest.json.jinja2"
  output_dir = accessibility_out_dir
  output_name = "chromevox_manifest"
  key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDltVl1k15pjRzuZfMc3B69inxwm2bZeZ2O8/zFO+NluHnBm3GJ3fzdOoFGJd+M16I8p7zxxQyHeDMfWYASyCeB8XnUEDKjqNLQfCnncsANzHsYoEbYj2nEUML2P13b9q+AAvpCBpAJ4cZp81e9n1y/vbSXHE4385cgkKueItzikQIDAQAB"
  make_guest = true
  make_v3 = true
}

manifest_variants("enhanced_network_tts_manifests") {
  input_file = "enhanced_network_tts_manifest.json.jinja2"
  output_dir = accessibility_out_dir
  output_name = "enhanced_network_tts_manifest"
  key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDncln/6lk4SWGmNLw4+40Z4I+pTk25rUZseUgibsHQnWJ88gu11T1hvbpCz7eNj1bCYqosUtTP405uT7TF/UxV+LrmmGuppbSN+gywdRAkSpjuMsPCU6xGwS998S0tuYgh9HoOEyE3g0VeeoSsfkM7P2yWouWGIMjsn5eWyvrm8nVT1ry7mZj44NLzRZIJotuFghJo8KhVkGuSqI2lRWbM7bSydzHyQhv1SLw+ETLqeZVXZU0HVoxgXV0aNgDu+qBG9ld645cThwHWROds9DX7JXUa1WzXageHy2M+O+P+Z2Gv8eAHOAdqopUUHTQEpKpkrZ5FLkYLLNNWjLgfBEanAgMBAAECggEASg2LgFeSLnFEPjK3WqAZ+IKiVLCKK/OmCcUQcHvxpXcF8SZc2tQcrK5Q71mYyEFpqA57lmz2TIHVMXRtScAO8Z8A5hE0uXYcfCTadIcwH/yCTAyQGBg/ke/z6x8ErpGjXgHkH6a9RQ7KXj1jP/GyPz2+17/NIopQ32z8y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_variants("select_to_speak_manifests") {
  input_file = "select_to_speak_manifest.json.jinja2"
  output_dir = accessibility_out_dir
  output_name = "select_to_speak_manifest"
  key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAukZ6JJWr0jHmFTkn0pcigpjI+cP0FqTo8FRIcCwy2fPeM+Ymf+7C9MK642i+Nhdr2qSsRF26AMIKbBdSDUnh04bfg5J/rKa/VO88LvXENYQMGhTo1y9mVg2OsbQJtEL9aTLU2G0SoKcr3g/+lggBKR5ydW1Qa0WGGAM9XrLm8iu/wn2uF4mfcMii6KfyEsAwWalpr/Td5WbtIoNNDpNeKO4ZSZJis1n9PZXqaOKpW7PqFDpEHw2PnPATxkcqj/wIx+Shgada0fhrzMlhXLhhj7ThSSWbuTz5n5NebuQ49/Z2ATgpBCSzYBVXEXMDe6LBBtGiZ/QR9UkA8Lz8bP6xIQIDAQAB"
  make_guest = true
  make_v3 = true
}

manifest_variants("switch_access_manifests") {
  input_file = "switch_access_manifest.json.jinja2"
  output_dir = accessibility_out_dir
  output_name = "switch_access_manifest"
  key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDVWTYdXNGhIG6FJKIhaohRRrYYGwg9cR2jea2NRBSEg+T7E3EvUyFy0ouez0N0omeSAL/xlvQtCjZJ72eCqDBgON/49SRtUdLS5TQ2U9cHYcIwI86llKMqqws6uMSwlWXldyNwKx5LVT1nR0+x3J744E2mymCSip2Y+NrGEA2yCUFL8D+O/uS+d5pVFb3NNjPTVbNOlhIs5ZUVX3FBij86ILivoSfRZMIZqK7MU8XDT1zolpFPiSYvDh1Qivwqar0pVYmNbCSjEgbGIuQh7zMaMdHC1HtvjbI20XFzWHyP/cW2YKszlfqawH+kdHSp4ANIjc7GCAjGJNxm33iMNwcFAgMBAAECggEAL47YakkzjZheKp3U6mAGDSAXHV6BQrkBY1yPXGstq7B/DZzy4RrF3QOkDf2jys8dCUXTg7YjrhqVqXuNdmmphvmGq8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PihGvhoTniKZwvpUacbAhop7rbiAVGx+RJ+tFG8P56AbvBVE="
  make_guest = true
  make_v3 = true
}

accessibility_strings("accessibility_strings") {
  out_dir = accessibility_out_dir
}

group("browser_tests") {
  testonly = true
  if (is_chromeos_ash) {
    deps = [
      "accessibility_common:browser_tests",
      "chromevox:browser_tests",
      "common:browser_tests",
      "enhanced_network_tts:browser_tests",
      "select_to_speak:browser_tests",
      "switch_access:browser_tests",
    ]
  }
}

group("unit_tests_js") {
  testonly = true
  if (is_chromeos_ash) {
    deps = [ ":misc_unit_tests_js" ]
  }
}

js2gtest("misc_unit_tests_js") {
  test_type = "unit"
  sources = [ "braille_ime/braille_ime_unittest.js" ]
  gen_include_files = [ "common/testing/accessibility_test_base.js" ]
  extra_js_files = [ "braille_ime/braille_ime.js" ]
}