blob: 8c5fdb57cc41fcaf55b4ebfe9cc8b22fde279f75 [file] [log] [blame]
# Copyright 2018 The Chromium Authors. All rights reserved.
# 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")
js_type_check("closure_compile_module") {
closure_flags = default_closure_args + [ "jscomp_error=strictCheckTypes" ]
deps = [
":background",
":cache",
":image_loader",
":image_loader_client",
":image_loader_util",
":load_image_request",
":piex_loader",
":request",
":scheduler",
]
}
js_library("background") {
deps = [
":image_loader",
]
}
js_library("cache") {
}
js_library("cache_unittest") {
deps = [
":cache",
":load_image_request",
"//ui/webui/resources/js:webui_resource_test",
]
}
js_library("image_loader") {
deps = [
":cache",
":load_image_request",
":piex_loader",
":request",
":scheduler",
"../externs:file_manager_private",
]
}
js_library("image_loader_unittest") {
deps = [
":image_loader",
"//ui/webui/resources/js:webui_resource_test",
]
}
js_library("image_loader_util") {
deps = [
":load_image_request",
":piex_loader",
"//ui/webui/resources/js:assert",
]
}
js_library("load_image_request") {
deps = [
"../file_manager/foreground/js/metadata:image_orientation",
"//ui/webui/resources/js:assert",
]
}
js_library("image_loader_client") {
deps = [
":load_image_request",
"../file_manager/common/js:lru_cache",
]
externs_list = [
"$externs_path/chrome.js",
"$externs_path/chrome_extensions.js",
"$externs_path/metrics_private.js",
]
}
js_library("image_loader_client_unittest") {
deps = [
":image_loader_client",
"../file_manager/common/js:unittest_util",
"//ui/webui/resources/js:webui_resource_test",
]
}
js_library("piex_loader") {
deps = [
":load_image_request",
"../file_manager/foreground/js/metadata:image_orientation",
]
}
js_library("piex_loader_unittest") {
deps = [
":piex_loader",
"../file_manager/common/js:unittest_util",
"//ui/webui/resources/js:webui_resource_test",
"//ui/webui/resources/js/cr:ui",
]
}
js_library("request") {
deps = [
":cache",
":image_loader_util",
":load_image_request",
":piex_loader",
"../file_manager/common/js:file_type",
"../file_manager/common/js:metrics",
"../file_manager/common/js:metrics_events",
]
externs_list = [ "../externs/platform.js" ]
}
js_library("scheduler") {
deps = [
":request",
]
}
js_unit_tests("unit_tests") {
# TODO(tapted): Uncomment the next line.
# closure_flags = default_closure_args + [ "jscomp_error=strictCheckTypes" ]
deps = [
":cache_unittest",
":image_loader_client_unittest",
":image_loader_unittest",
":piex_loader_unittest",
]
}
group("closure_compile") {
deps = [
":closure_compile_module",
":unit_tests_type_check",
]
}