# 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("//ui/file_manager/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_library("dimmable_ui_controller_unittest") { deps = [ ":dimmable_ui_controller", "//ui/webui/resources/js:webui_resource_test", ] } js_library("entry_list_watcher") { deps = [ "//ui/webui/resources/js:assert", "//ui/webui/resources/js/cr/ui:array_data_model", ] externs_list = [ "$externs_path/file_system_provider.js", "$externs_path/file_manager_private.js", ] } js_library("entry_list_watcher_unittest") { deps = [ ":entry_list_watcher", "../../file_manager/common/js:mock_entry", "../../file_manager/common/js:unittest_util", "//ui/webui/resources/js:webui_resource_test", ] } js_library("error_banner") { deps = [ "../../file_manager/common/js:util", ] } js_library("gallery") { deps = [ ":gallery_constants", ":gallery_item", ":thumbnail_mode", "../../file_manager/common/js:util", "../../file_manager/foreground/js:volume_manager_wrapper", "../../file_manager/foreground/js/ui:files_confirm_dialog", "../../file_manager/foreground/js/ui:share_dialog", "../../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_library("gallery_data_model_unittest") { deps = [ ":gallery_data_model", ":mock_gallery_item", "../../file_manager/common/js:unittest_util", ] } js_library("gallery_item") { deps = [ ":gallery_util", "../../file_manager/common/js:metrics", "../../file_manager/common/js:util", "../../file_manager/foreground/js:volume_manager_wrapper", "../../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_library("gallery_item_unittest") { deps = [ ":gallery_item", ":mock_gallery_item", "../../file_manager/common/js:unittest_util", "//ui/webui/resources/js:webui_resource_test", ] } js_library("gallery_util") { deps = [ "../../file_manager/common/js:file_type", "../../file_manager/common/js:util", "../../file_manager/common/js:volume_manager_common", "../../file_manager/foreground/js:volume_manager_wrapper", ] } js_library("gallery_util_unittest") { deps = [ ":gallery_util", "../../file_manager/common/js:mock_entry", "../../file_manager/common/js:unittest_util", "//ui/webui/resources/js:webui_resource_test", ] } 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_library("ribbon_unittest") { deps = [ ":ribbon", ] } js_library("slide_mode") { deps = [ ":dimmable_ui_controller", ":error_banner", ":gallery_constants", ":gallery_data_model", ":gallery_item", ":ribbon", "../../file_manager/common/js:metrics", "../../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_library("slide_mode_unittest") { deps = [ ":slide_mode", "../../file_manager/common/js:unittest_util", "//ui/webui/resources/js:webui_resource_test", ] } 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") { deps = [ ":closure_compile_module", ":unit_tests", ] }