summaryrefslogtreecommitdiffstats
path: root/chromium/components/web_package/BUILD.gn
blob: 709d321ded0eaab87bfb4abfcbd225ac2b2243e7 (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 2020 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.

import("//testing/libfuzzer/fuzzer_test.gni")

static_library("web_package") {
  sources = [
    "web_bundle_parser.cc",
    "web_bundle_parser.h",
    "web_bundle_parser_factory.cc",
    "web_bundle_parser_factory.h",
    "web_bundle_utils.cc",
    "web_bundle_utils.h",
  ]

  deps = [
    "//base",
    "//components/cbor",
    "//mojo/public/cpp/bindings",
    "//net",
    "//services/network/public/mojom",
  ]

  public_deps = [ "//components/web_package/mojom" ]
}

static_library("test_support") {
  testonly = true
  sources = [
    "test_support/web_bundle_builder.cc",
    "test_support/web_bundle_builder.h",
  ]

  deps = [
    "//base",
    "//components/cbor",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "web_bundle_parser_factory_unittest.cc",
    "web_bundle_parser_unittest.cc",
    "web_bundle_utils_unittest.cc",
  ]
  deps = [
    ":test_support",
    ":web_package",
    "//base/test:test_support",
    "//components/cbor",
    "//testing/gtest",
  ]
}

fuzzer_test("web_bundle_parser_fuzzer") {
  sources = [ "web_bundle_parser_fuzzer.cc" ]
  deps = [
    ":web_package",
    "//base",
    "//mojo/core/embedder",
  ]
  seed_corpus = "//components/test/data/web_package"
}