blob: 6f092ca3401916fecfa35a029c13b110cb0e8d0e [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") {
deps = [
":background",
":dimmable_ui_controller",
":entry_list_watcher",
":error_banner",
":gallery",
":gallery_constants",
":gallery_data_model",
":gallery_item",
":gallery_util",
":metadata_worker",
":ribbon",
":slide_mode",
":thumbnail_mode",
]
}
js_library("background") {
deps = [
"../../file_manager/background/js:app_window_wrapper",
"../../file_manager/background/js:background_base",
"../../file_manager/common/js:util",
]
}
js_library("dimmable_ui_controller") {
deps = [
":gallery_constants",
"image_editor:image_editor_prompt",
"//ui/webui/resources/js:assert",
]
externs_list = [
"$externs_path/chrome.js",
"$externs_path/chrome_extensions.js", # For chrome.accessibilityFeatures.
]
}
js_unittest("dimmable_ui_controller_unittest") {
deps = [
":dimmable_ui_controller",
"//ui/webui/resources/js:webui_resource_test",
]
}
js_library("entry_list_watcher") {
deps = [
"../../externs:file_manager_private",
"//ui/webui/resources/js:assert",
"//ui/webui/resources/js/cr/ui:array_data_model",
]
}
js_unittest("entry_list_watcher_unittest") {
deps = [
":entry_list_watcher",
"../../file_manager/common/js:mock_entry",
"//ui/file_manager/base/js:test_error_reporting",
]
}
js_library("error_banner") {
deps = [
"../../file_manager/common/js:util",
]
}
js_library("gallery") {
deps = [
":gallery_constants",
":gallery_item",
":thumbnail_mode",
"//ui/file_manager/base/js:filtered_volume_manager",
"//ui/file_manager/file_manager/common/js:util",
"//ui/file_manager/file_manager/foreground/js/ui:files_confirm_dialog",
"//ui/file_manager/gallery/js:slide_mode",
"//ui/webui/resources/js:i18n_template_no_process",
]
}
js_library("gallery_constants") {
}
js_library("gallery_data_model") {
deps = [
":entry_list_watcher",
":gallery_item",
"../../file_manager/common/js:util",
"../../file_manager/foreground/js/metadata:thumbnail_model",
"//ui/webui/resources/js:assert",
"//ui/webui/resources/js/cr/ui:array_data_model",
]
}
js_unittest("gallery_data_model_unittest") {
deps = [
":gallery_data_model",
":mock_gallery_item",
"//ui/file_manager/base/js:test_error_reporting",
]
}
js_library("gallery_item") {
deps = [
":gallery_metrics",
":gallery_util",
"../../file_manager/common/js:util",
"../../file_manager/foreground/js/metadata:metadata_model",
"../../file_manager/foreground/js/metadata:thumbnail_model",
"image_editor:image_encoder",
"image_editor:image_util",
]
externs_list = [ "../../externs/entry_location.js" ]
}
js_unittest("gallery_item_unittest") {
deps = [
":gallery_item",
":mock_gallery_item",
"//ui/file_manager/base/js:test_error_reporting",
]
}
js_library("gallery_metrics") {
deps = [
"../../file_manager/common/js:metrics_base",
]
}
js_library("gallery_util") {
deps = [
"../../file_manager/common/js:file_type",
"../../file_manager/common/js:util",
"//ui/file_manager/base/js:volume_manager_types",
"//ui/file_manager/externs:volume_manager",
]
}
js_unittest("gallery_util_unittest") {
deps = [
":gallery_util",
"../../file_manager/common/js:mock_entry",
"//ui/file_manager/base/js:test_error_reporting",
]
}
js_library("metadata_worker") {
}
js_library("mock_gallery_item") {
deps = [
":gallery_item",
"../../file_manager/common/js:mock_entry",
"../../file_manager/foreground/js/metadata:mock_metadata",
]
}
js_library("ribbon") {
deps = [
":gallery_data_model",
":gallery_item",
"../../file_manager/foreground/js:thumbnail_loader",
"../../file_manager/foreground/js/metadata:thumbnail_model",
"image_editor:image_util",
"//ui/webui/resources/js/cr/ui:array_data_model",
"//ui/webui/resources/js/cr/ui:list_selection_model",
]
}
js_unittest("ribbon_unittest") {
deps = [
":ribbon",
]
}
js_library("slide_mode") {
deps = [
":dimmable_ui_controller",
":error_banner",
":gallery_constants",
":gallery_data_model",
":gallery_item",
":gallery_metrics",
":ribbon",
"../../file_manager/common/js:util",
"../../file_manager/foreground/elements:files_toggle_ripple",
"image_editor:image_adjust",
"image_editor:image_editor",
"image_editor:image_transform",
"image_editor:image_util",
"image_editor:image_view",
"image_editor:viewport",
"//third_party/polymer/v1_0/components-chromium/paper-progress:paper-progress-extracted",
]
externs_list = [ "../../externs/gallery_foreground.js" ]
}
js_unittest("slide_mode_unittest") {
deps = [
":slide_mode",
"//ui/file_manager/base/js:test_error_reporting",
]
}
js_library("thumbnail_mode") {
deps = [
":error_banner",
":gallery_constants",
":gallery_data_model",
":gallery_item",
"../../file_manager/foreground/js:thumbnail_loader",
"../../file_manager/foreground/js/metadata:thumbnail_model",
"image_editor:image_editor",
"//ui/webui/resources/js/cr/ui:list_selection_model",
]
}
js_unit_tests("unit_tests") {
deps = [
":dimmable_ui_controller_unittest",
":entry_list_watcher_unittest",
":gallery_data_model_unittest",
":gallery_item_unittest",
":gallery_util_unittest",
":ribbon_unittest",
":slide_mode_unittest",
]
}
group("closure_compile") {
testonly = true
deps = [
":closure_compile_module",
":unit_tests_type_check",
]
}