# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//ios/web/public/js_messaging/optimize_ts.gni")
source_set("choose_file") {
sources = [
"choose_file_controller.h",
"choose_file_controller.mm",
"choose_file_event.h",
"choose_file_event.mm",
"choose_file_java_script_feature.h",
"choose_file_java_script_feature.mm",
"choose_file_tab_helper.h",
"choose_file_tab_helper.mm",
"choose_file_util.h",
"choose_file_util.mm",
]
deps = [
":choose_file_js",
"//base",
"//ios/chrome/browser/shared/public/features",
"//ios/web/public",
"//ios/web/public/js_messaging",
]
frameworks = [ "Foundation.framework" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"choose_file_controller_unittest.mm",
"choose_file_java_script_feature_unittest.mm",
"choose_file_tab_helper_unittest.mm",
]
deps = [
":choose_file",
":test_support",
"//base",
"//base/test:test_support",
"//ios/chrome/browser/shared/model/profile/test",
"//ios/chrome/browser/shared/public/features",
"//ios/web/public/test",
"//testing/gtest",
]
}
source_set("test_support") {
testonly = true
sources = [
"fake_choose_file_controller.h",
"fake_choose_file_controller.mm",
]
deps = [
":choose_file",
"//base",
]
}
optimize_ts("choose_file_js") {
visibility = [ ":choose_file" ]
sources = [ "resources/choose_file.ts" ]
deps = [ "//ios/web/public/js_messaging:util_scripts" ]
}