blob: 4d53f0a44211509e10928971c7b4ada951e738f6 [file] [log] [blame]
# Copyright 2022 The Cobalt Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
static_library("web_events") {
sources = [
"custom_event.h",
"environment_settings.h",
"error_event.h",
"event.cc",
"event.h",
"event_target.cc",
"event_target.h",
"event_target_listener_info.cc",
"event_target_listener_info.h",
"global_stats.cc",
"global_stats.h",
"on_error_event_listener.cc",
"on_error_event_listener.h",
]
deps = [
":dom_exception",
"//cobalt/base",
"//cobalt/browser:generated_bindings",
"//cobalt/script",
"//cobalt/script:engine",
"//cobalt/script/v8c:engine",
"//nb",
"//url",
]
public_deps = [
# Additionally, ensure that the include directories for generated
# headers are put on the include directories for targets that depend
# on this one.
":dom_exception",
"//cobalt/browser:generated_types",
]
}
static_library("web") {
# Creates cycle with //cobalt/dom
check_includes = false
sources = [
"agent.cc",
"agent.h",
"blob.cc",
"blob.h",
"buffer_source.cc",
"buffer_source.h",
"cobalt_ua_data_values_interface.cc",
"cobalt_ua_data_values_interface.h",
"context.h",
"crypto.cc",
"crypto.h",
"csp_delegate.cc",
"csp_delegate.h",
"csp_delegate_factory.cc",
"csp_delegate_factory.h",
"csp_violation_reporter.cc",
"csp_violation_reporter.h",
"location_base.h",
"message_event.cc",
"message_event.h",
"message_port.cc",
"message_port.h",
"navigator_base.cc",
"navigator_base.h",
"navigator_ua_data.cc",
"navigator_ua_data.h",
"security_policy_violation_event.cc",
"security_policy_violation_event.h",
"url.cc",
"url.h",
"url_registry.h",
"url_utils.cc",
"url_utils.h",
"user_agent_platform_info.h",
"window_or_worker_global_scope.cc",
"window_or_worker_global_scope.h",
]
deps = [
":web_events",
"//cobalt/base",
"//cobalt/browser:generated_bindings",
"//cobalt/csp",
"//cobalt/network",
"//cobalt/network_bridge",
"//cobalt/script",
"//cobalt/script:engine",
"//cobalt/script/v8c:engine",
"//url",
]
public_deps = [
# Additionally, ensure that the include directories for generated
# headers are put on the include directories for targets that depend
# on this one.
":web_events",
"//cobalt/browser:generated_types",
]
}
static_library("window_timers") {
has_pedantic_warnings = true
sources = [
"window_timers.cc",
"window_timers.h",
]
deps = [
":stat_tracker",
":web_events",
"//cobalt/base",
"//cobalt/script",
"//nb",
]
}
static_library("stat_tracker") {
has_pedantic_warnings = true
sources = [
"stat_tracker.cc",
"stat_tracker.h",
]
deps = [ "//cobalt/base" ]
}
static_library("dom_exception") {
has_pedantic_warnings = true
sources = [
"dom_exception.cc",
"dom_exception.h",
]
deps = [ "//cobalt/script" ]
}
target(gtest_target_type, "web_test") {
testonly = true
has_pedantic_warnings = true
sources = [
"blob_test.cc",
"crypto_test.cc",
"csp_delegate_test.cc",
"custom_event_test.cc",
"error_event_test.cc",
"event_target_test.cc",
"event_test.cc",
"message_event_test.cc",
"url_test.cc",
"url_utils_test.cc",
"window_timers_test.cc",
]
deps = [
":stat_tracker",
":web",
":window_timers",
"//cobalt/base",
"//cobalt/browser:browser",
"//cobalt/browser:generated_bindings",
"//cobalt/browser:generated_types",
"//cobalt/css_parser",
"//cobalt/cssom",
"//cobalt/dom/testing:dom_testing",
"//cobalt/dom_parser",
"//cobalt/loader",
"//cobalt/script",
"//cobalt/script/v8c:engine",
"//cobalt/test:run_all_unittests",
"//cobalt/web/testing:web_testing",
"//nb",
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
"//url",
]
}