chromium/ui/file_manager/file_manager/background/js/BUILD.gn

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

import("//third_party/closure_compiler/compile_js.gni")
import("//third_party/closure_compiler/js_unit_tests.gni")
import("//ui/file_manager/base/gn/js_test_type_check.gni")
import("//ui/webui/resources/tools/optimize_webui.gni")
import("//ui/webui/webui_features.gni")

# Default to private.
visibility = [ ":*" ]

tsc_folder =
    rebase_path("$target_gen_dir/../../../tsc/file_manager/background/js",
                root_build_dir)

# Build the test utils that is loaded at runtime by the browser test.
optimize_webui("build") {
  visibility += [ "//ui/file_manager:build_grd" ]
  host = "file-manager"

  input = tsc_folder

  js_module_in_files = [ "runtime_loaded_test_util.js" ]
  deps = []
  if (enable_webui_inline_sourcemaps) {
    deps += [ "//ui/file_manager:merge_source_maps" ]
  } else {
    deps += [ "//ui/file_manager:build_ts" ]
  }
}