summaryrefslogtreecommitdiff
path: root/chromium/fuchsia/http/BUILD.gn
blob: 0144f0b4b8d2837c6bc5d4476bac50292dd3a93c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 2018 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("//build/config/fuchsia/symbol_archive.gni")
import("//build/util/process_version.gni")
import("//testing/test.gni")
import("//tools/grit/repack.gni")

source_set("core") {
  sources = [
    "http_service_impl.cc",
    "http_service_impl.h",
    "url_loader_impl.cc",
    "url_loader_impl.h",
  ]
  public_deps = [
    "//base:base",
    "//fuchsia/base",
    "//net:net",
    "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.net.oldhttp",
    "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.sys",
    "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
  ]
  visibility = [ ":*" ]
}

executable("http_exe") {
  sources = [ "http_service_main.cc" ]
  deps = [ ":core" ]
  visibility = [ ":*" ]
}

cr_fuchsia_package("http_pkg") {
  binary = ":http_exe"
  package_name_override = "http"
  manifest = "http.cmx"
}

fuchsia_package_runner("http_pkg_runner") {
  package = ":http_pkg"
  package_name_override = "http"
}

test("http_service_tests") {
  sources = [ "http_service_unittest.cc" ]
  deps = [
    ":core",
    "//base/test:run_all_unittests",
    "//net:test_support",
    "//testing/gtest",
  ]
  data = [ "testdata/" ]
}

if (is_official_build) {
  symbol_archive("symbol_archive") {
    deps = [ ":http_pkg" ]
    ids_txt = "$root_gen_dir/fuchsia/http/http/ids.txt"
    archive_name = "$root_gen_dir/fuchsia/http/http/http.symbols.tar.bz2"
  }
}  # is_official_build