summaryrefslogtreecommitdiffstats
path: root/components/web_resource/BUILD.gn
blob: 387a0061ef6c12a435a9213739dde022ae51ec52 (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
66
67
68
69
70
71
72
73
74
75
# Copyright 2014 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.

static_library("web_resource") {
  sources = [
    "eula_accepted_notifier.cc",
    "eula_accepted_notifier.h",
    "notification_promo.cc",
    "notification_promo.h",
    "promo_resource_service.cc",
    "promo_resource_service.h",
    "resource_request_allowed_notifier.cc",
    "resource_request_allowed_notifier.h",
    "web_resource_pref_names.cc",
    "web_resource_pref_names.h",
    "web_resource_service.cc",
    "web_resource_service.h",
    "web_resource_switches.cc",
    "web_resource_switches.h",
  ]

  if (is_android || is_ios) {
    sources += [
      "notification_promo_mobile_ntp.cc",
      "notification_promo_mobile_ntp.h",
    ]
  }

  deps = [
    "//base",
    "//components/google/core/browser",
    "//components/pref_registry",
    "//components/prefs",
    "//components/version_info",
    "//net",
    "//ui/base",
  ]
}

static_library("test_support") {
  sources = [
    "resource_request_allowed_notifier_test_util.cc",
    "resource_request_allowed_notifier_test_util.h",
  ]

  deps = [
    ":web_resource",
    "//base",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "eula_accepted_notifier_unittest.cc",
    "promo_resource_service_unittest.cc",
    "resource_request_allowed_notifier_unittest.cc",
  ]

  if (is_android || is_ios) {
    sources += [ "promo_resource_service_mobile_ntp_unittest.cc" ]
  }

  deps = [
    ":test_support",
    ":web_resource",
    "//base",
    "//components/prefs:test_support",
    "//components/version_info",
    "//net:test_support",
    "//testing/gtest",
    "//third_party/icu",
  ]
}