# 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/config/fuchsia/generate_runner_scripts.gni") import("//testing/test.gni") # Integration helpers for commonly used fuchsia.* APIs. source_set("base") { sources = [ "config_reader.cc", "feedback_registration.cc", "fuchsia_dir_scheme.cc", "init_logging.cc", "inspect.cc", "mem_buffer_util.cc", "string_util.cc", ] public = [ "config_reader.h", "feedback_registration.h", "fuchsia_dir_scheme.h", "init_logging.h", "inspect.h", "mem_buffer_util.h", "string_util.h", ] deps = [ "//base", "//components/version_info", "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.feedback", "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.mem", "//third_party/fuchsia-sdk/sdk/pkg/fdio", "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp", "//third_party/fuchsia-sdk/sdk/pkg/sys_inspect_cpp", "//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 = [ ":*" ] } 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", "//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", "inspect_unittest.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", "//components/version_info", "//testing/gtest", "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp", "//third_party/fuchsia-sdk/sdk/pkg/sys_inspect_cpp", ] }