chromium/third_party/blink/renderer/modules/direct_sockets/BUILD.gn

# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//third_party/blink/renderer/modules/modules.gni")

blink_modules_sources("direct_sockets") {
  sources = [
    "socket.cc",
    "socket.h",
    "stream_wrapper.cc",
    "stream_wrapper.h",
    "tcp_readable_stream_wrapper.cc",
    "tcp_readable_stream_wrapper.h",
    "tcp_server_readable_stream_wrapper.cc",
    "tcp_server_readable_stream_wrapper.h",
    "tcp_server_socket.cc",
    "tcp_server_socket.h",
    "tcp_socket.cc",
    "tcp_socket.h",
    "tcp_writable_stream_wrapper.cc",
    "tcp_writable_stream_wrapper.h",
    "udp_readable_stream_wrapper.cc",
    "udp_readable_stream_wrapper.h",
    "udp_socket.cc",
    "udp_socket.h",
    "udp_socket_mojo_remote.cc",
    "udp_socket_mojo_remote.h",
    "udp_writable_stream_wrapper.cc",
    "udp_writable_stream_wrapper.h",
  ]
  deps = [ "//net:net" ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "tcp_readable_stream_wrapper_unittest.cc",
    "tcp_socket_unittest.cc",
    "tcp_writable_stream_wrapper_unittest.cc",
    "udp_readable_stream_wrapper_unittest.cc",
    "udp_writable_stream_wrapper_unittest.cc",
  ]

  configs += [
    "//third_party/blink/renderer:config",
    "//third_party/blink/renderer:inside_blink",
    "//third_party/blink/renderer/core:blink_core_pch",
  ]

  deps = [
    "//base/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/blink/public/mojom:mojom_platform_blink_headers",
    "//third_party/blink/renderer/controller:blink_bindings_test_sources",
    "//third_party/blink/renderer/modules",
    "//third_party/blink/renderer/platform",
    "//third_party/blink/renderer/platform:test_support",
    "//third_party/blink/renderer/platform/wtf",
  ]
}