Upload upstream chromium 120.0.6099.5
[platform/framework/web/chromium-efl.git] / components / custom_handlers / BUILD.gn
1 # Copyright 2021 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 static_library("custom_handlers") {
6   sources = [
7     "pref_names.cc",
8     "pref_names.h",
9     "protocol_handler.cc",
10     "protocol_handler.h",
11     "protocol_handler_registry.cc",
12     "protocol_handler_registry.h",
13     "protocol_handler_throttle.cc",
14     "protocol_handler_throttle.h",
15   ]
16
17   deps = [
18     "//build:chromeos_buildflags",
19     "//components/keyed_service/content",
20     "//components/keyed_service/core",
21     "//components/pref_registry",
22     "//components/prefs",
23     "//components/strings",
24     "//components/user_prefs",
25     "//content/public/browser",
26     "//content/public/common",
27     "//net",
28     "//services/network/public/cpp:cpp_base",
29     "//third_party/blink/public/common:headers",
30   ]
31
32   if (!is_android) {
33     sources += [
34       "register_protocol_handler_permission_request.cc",
35       "register_protocol_handler_permission_request.h",
36     ]
37
38     deps += [
39       "//components/permissions",
40       "//ui/base",
41     ]
42   }
43 }
44
45 source_set("test_support") {
46   testonly = true
47   sources = [
48     "simple_protocol_handler_registry_factory.cc",
49     "simple_protocol_handler_registry_factory.h",
50     "test_protocol_handler_registry_delegate.cc",
51     "test_protocol_handler_registry_delegate.h",
52   ]
53   deps = [
54     ":custom_handlers",
55     "//base",
56     "//components/keyed_service/content",
57   ]
58 }
59
60 source_set("unit_tests") {
61   testonly = true
62
63   sources = [ "protocol_handler_registry_unittest.cc" ]
64
65   deps = [
66     ":custom_handlers",
67     ":test_support",
68     "//base/test:test_support",
69     "//components/pref_registry",
70     "//components/sync_preferences",
71     "//components/sync_preferences:test_support",
72     "//components/user_prefs",
73     "//content/public/browser",
74     "//content/public/common",
75     "//content/test:test_support",
76     "//testing/gmock",
77     "//testing/gtest",
78     "//third_party/blink/public/common:headers",
79   ]
80 }
81
82 source_set("browser_tests") {
83   testonly = true
84   defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
85   sources = [ "protocol_handler_registry_browsertest.cc" ]
86   deps = [
87     ":custom_handlers",
88     ":test_support",
89     "//base/test:test_support",
90     "//components/keyed_service/content",
91     "//content/shell:content_shell_lib",
92     "//content/test:browsertest_support",
93     "//content/test:test_support",
94     "//net:test_support",
95     "//testing/gmock",
96     "//testing/gtest",
97   ]
98   if (is_ios) {
99     deps += [
100       "//components/test:custom_handlers_test_bundle_data",
101       "//components/test:fenced_frames_test_bundle_data",
102     ]
103   }
104 }