# 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("//tools/typescript/webui_ts_library.gni")
import("//ui/webui/resources/tools/generate_grd.gni")
assert(is_chromeos, "Nearby Share is CrOS only")
webui_ts_library("build_ts") {
root_dir = "."
out_dir = "$target_gen_dir/tsc"
composite = true
tsconfig_base = "//chrome/test/data/webui/tsconfig_base.json"
in_files = [
"shared/fake_nearby_contact_manager.js",
"shared/fake_nearby_share_settings.js",
]
deps = [ "//ui/webui/resources/mojo:build_ts" ]
extra_deps = [ "//ash/webui/common/resources:generate_definitions" ]
}
# Creates the necessary GRDP file with local test files for OS settings.
generate_grd("build_grdp") {
testonly = true
grd_prefix = "nearby_share"
out_grd = "$target_gen_dir/resources.grdp"
resource_path_prefix = "nearby_share"
deps = [ ":build_ts" ]
# Add local test files.
input_files_base_dir = rebase_path(".", "//")
input_files = [
"fake_mojo_interfaces.js",
"nearby_confirmation_page_test.js",
"nearby_discovery_page_test.js",
"nearby_share_app_test.js",
"shared/nearby_contact_visibility_test.js",
"shared/nearby_device_icon_test.js",
"shared/nearby_device_test.js",
"shared/nearby_onboarding_one_page_test.js",
"shared/nearby_onboarding_page_test.js",
"shared/nearby_page_template_test.js",
"shared/nearby_preview_test.js",
"shared/nearby_progress_test.js",
"shared/nearby_visibility_page_test.js",
]
manifest_files =
filter_include(get_target_outputs(":build_ts"), [ "*_manifest.json" ])
}