chromium/components/cronet/native/test/BUILD.gn

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

import("//components/cronet/native/include/headers.gni")
import("//testing/test.gni")

source_set("cronet_native_testutil") {
  testonly = true

  deps = [
    "//base",
    "//components/cronet/native:cronet_native_headers",
    "//net:test_support",
  ]

  configs += [ "//components/cronet/native:cronet_native_include_config" ]
  public_configs = [ "//components/cronet/native:cronet_native_include_config" ]

  sources = [
    "test_util.cc",
    "test_util.h",
  ]
}

# Tests for publicly exported Cronet Native API. This target does NOT depend on
# cronet_native_impl to prevent static linking of implementation into test app.
source_set("cronet_native_tests") {
  testonly = true

  deps = [
    ":cronet_native_testutil",
    "//base",
    "//base/allocator:buildflags",
    "//base/test:test_support",
    "//components/cronet/native:cronet_native_headers",
    "//components/cronet/testing:test_support",
    "//components/grpc_support:bidirectional_stream_test",
    "//components/grpc_support/test:get_stream_engine_header",
    "//net:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]

  configs += [ "//components/cronet/native:cronet_native_include_config" ]

  sources = [
    "buffer_test.cc",
    "engine_test.cc",
    "executors_test.cc",
    "test_request_finished_info_listener.cc",
    "test_request_finished_info_listener.h",
    "test_stream_engine.cc",
    "test_upload_data_provider.cc",
    "test_upload_data_provider.h",
    "test_url_request_callback.cc",
    "test_url_request_callback.h",
    "url_request_test.cc",
  ]
}