blob: 50f86bd03ea9fb8563f528b2f322e5c0f27c607a [file] [log] [blame]
# Copyright 2021 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/build/config.gni")
import("//ios/web/public/js_messaging/optimize_ts.gni")
source_set("window_error") {
deps = [
":error_js",
":script_error_stack_util",
":wrap_gcrweb_functions",
"//base",
"//ios/web/common:features",
"//ios/web/public/js_messaging",
"//net",
"//url",
]
sources = [
"catch_gcrweb_script_errors_java_script_feature.h",
"catch_gcrweb_script_errors_java_script_feature.mm",
"error_event_listener_java_script_feature.h",
"error_event_listener_java_script_feature.mm",
"script_error_message_handler_java_script_feature.h",
"script_error_message_handler_java_script_feature.mm",
]
}
source_set("script_error_stack_util") {
deps = [ "//base" ]
sources = [
"script_error_stack_util.h",
"script_error_stack_util.mm",
]
}
optimize_ts("error_js") {
visibility = [ ":window_error" ]
sources = [ "resources/error.ts" ]
deps = [ "//ios/web/public/js_messaging:util_scripts" ]
}
optimize_ts("wrap_gcrweb_functions") {
visibility = [ ":window_error" ]
sources = [ "resources/wrap_gcrweb_functions.ts" ]
deps = [
"//ios/web/public/js_messaging:error_reporting",
"//ios/web/public/js_messaging:gcrweb",
]
}
source_set("unittests") {
testonly = true
deps = [
":script_error_stack_util",
":window_error",
"//base/test:test_support",
"//ios/web/js_messaging:java_script_feature",
"//ios/web/public/js_messaging",
"//ios/web/public/test",
"//ios/web/public/test:test_fixture",
"//testing/gtest",
]
sources = [
"script_error_message_handler_java_script_feature_unittest.mm",
"script_error_stack_util_unittest.mm",
]
}