blob: 0770a60105cbe1b4c59e59a4e8ec9f1787c5d528 [file] [log] [blame]
# Copyright 2021 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.
source_set("xhr_settings") {
has_pedantic_warnings = true
sources = [ "xhr_settings.h" ]
public_deps = [ "//cobalt/base" ]
}
static_library("xhr") {
# Creates cycle with //cobalt/dom through xml_document.h
check_includes = false
has_pedantic_warnings = true
sources = [
"fetch_buffer_pool.cc",
"fetch_buffer_pool.h",
"url_fetcher_buffer_writer.cc",
"url_fetcher_buffer_writer.h",
"xml_http_request.cc",
"xml_http_request.h",
"xml_http_request_event_target.cc",
"xml_http_request_event_target.h",
]
public_deps = [ ":xhr_settings" ]
deps = [
":global_stats",
"//cobalt/base",
"//cobalt/dom_parser",
"//cobalt/loader",
"//cobalt/network",
"//cobalt/script",
"//cobalt/web",
"//net",
"//starboard:starboard_group",
"//third_party/protobuf:protobuf_lite",
"//url",
]
}
static_library("global_stats") {
has_pedantic_warnings = true
sources = [
"global_stats.cc",
"global_stats.h",
]
deps = [ "//cobalt/base" ]
}
target(gtest_target_type, "xhr_test") {
testonly = true
has_pedantic_warnings = true
sources = [
"fetch_buffer_pool_test.cc",
"xhr_settings_test.cc",
"xml_http_request_test.cc",
]
deps = [
":xhr",
"//cobalt/base",
"//cobalt/browser",
"//cobalt/debug",
"//cobalt/dom/testing:dom_testing",
"//cobalt/script",
"//cobalt/test:run_all_unittests",
"//cobalt/web:dom_exception",
"//cobalt/web/testing:web_testing",
"//testing/gmock",
"//testing/gtest",
"//url",
# TODO: Remove the dependency below, it works around the fact that
# ScriptValueFactory has non-virtual method CreatePromise().
"//cobalt/script:engine",
]
}