| # 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/fidl_library.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//testing/test.gni") |
| |
| # Integration helpers for commonly used fuchsia.* APIs. |
| source_set("base") { |
| sources = [ |
| "init_logging.cc", |
| "mem_buffer_util.cc", |
| "string_util.cc", |
| ] |
| public = [ |
| "init_logging.h", |
| "mem_buffer_util.h", |
| "string_util.h", |
| ] |
| deps = [ |
| "//base", |
| "//third_party/fuchsia-sdk/sdk:mem", |
| ] |
| } |
| |
| # 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:modular", |
| "//third_party/fuchsia-sdk/sdk: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/fuchsia-sdk/sdk:web", |
| ] |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "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:modular", |
| "//third_party/fuchsia-sdk/sdk:web", |
| "//url", |
| ] |
| } |
| |
| # Unit-tests for all //fuchsia/base utilities. |
| test("cr_fuchsia_base_unittests") { |
| sources = [ |
| "agent_impl_unittests.cc", |
| ] |
| deps = [ |
| ":modular", |
| ":test_support", |
| "//base", |
| "//base:testfidl", |
| "//base/test:run_all_unittests", |
| "//base/test:test_support", |
| "//testing/gtest", |
| ] |
| } |