blob: 69994a80dcdb44aea6b555b8ccc7cfc0550092c0 [file] [log] [blame]
# Copyright 2019 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.
assert(is_fuchsia)
import("//build/buildflag_header.gni")
import("//build/config/fuchsia/generate_runner_scripts.gni")
import("//fuchsia/release_channel.gni")
import("//testing/test.gni")
# Integration helpers for commonly used fuchsia.* APIs.
source_set("base") {
sources = [
"config_reader.cc",
"fuchsia_dir_scheme.cc",
"init_logging.cc",
"mem_buffer_util.cc",
"scoped_pseudo_file_publisher.cc",
"string_util.cc",
]
public = [
"config_reader.h",
"fuchsia_dir_scheme.h",
"init_logging.h",
"mem_buffer_util.h",
"scoped_pseudo_file_publisher.h",
"string_util.h",
]
deps = [
"//base",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mem",
"//url",
]
}
# Integration helpers for fuchsia.modular.
source_set("modular") {
sources = [
"agent_impl.cc",
"agent_impl.h",
"agent_manager.cc",
"agent_manager.h",
"lifecycle_impl.cc",
"lifecycle_impl.h",
]
deps = [ "//base" ]
public_deps = [
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.modular",
"//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
]
}
# FIDL/Mojo adapters for MessagePorts.
source_set("message_port") {
sources = [ "message_port.cc" ]
public = [ "message_port.h" ]
deps = [
":base",
"//base",
"//mojo/public/cpp/bindings",
"//third_party/blink/public/common",
"//third_party/blink/public/common:headers",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.web",
]
}
source_set("legacymetrics") {
sources = [
"legacymetrics_client.cc",
"legacymetrics_client.h",
"legacymetrics_histogram_flattener.cc",
"legacymetrics_histogram_flattener.h",
"legacymetrics_user_event_recorder.cc",
"legacymetrics_user_event_recorder.h",
]
public = [ "legacymetrics_client.h" ]
deps = [ "//base" ]
public_deps = [ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.legacymetrics" ]
friend = [ ":*" ]
}
# Used to propagate release-qualified package names to integration test code.
buildflag_header("release_channel_buildflags") {
header = "release_channel.h"
flags = [ "FUCHSIA_RELEASE_CHANNEL_SUFFIX=\"$release_channel_suffix\"" ]
visibility = [ "//fuchsia/*" ]
}
source_set("test_support") {
testonly = true
sources = [
"context_provider_test_connector.cc",
"context_provider_test_connector.h",
"fake_component_context.cc",
"fake_component_context.h",
"fit_adapter.h",
"frame_test_util.cc",
"frame_test_util.h",
"result_receiver.h",
"test_devtools_list_fetcher.cc",
"test_devtools_list_fetcher.h",
"test_navigation_listener.cc",
"test_navigation_listener.h",
"url_request_rewrite_test_util.cc",
"url_request_rewrite_test_util.h",
]
public_deps = [
":base",
":modular",
":release_channel_buildflags",
"//base",
"//net",
"//net:test_support",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.modular",
"//third_party/fuchsia-sdk/sdk/fidl/fuchsia.web",
"//url",
]
}
# Unit-tests for all //fuchsia/base utilities.
test("cr_fuchsia_base_unittests") {
sources = [
"agent_impl_unittests.cc",
"legacymetrics_client_unittest.cc",
"legacymetrics_histogram_flattener_unittest.cc",
"legacymetrics_user_event_recorder_unittest.cc",
]
deps = [
":legacymetrics",
":modular",
":test_support",
"//base",
"//base:testfidl",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//testing/gtest",
]
}