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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
|
# 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.
import("//build/config/allocator.gni")
import("//build/config/ui.gni")
import("//third_party/protobuf/proto_library.gni")
assert(is_chromeos, "Non-ChromeOS builds must not depend on //chromeos")
gypi_values = exec_script("//build/gypi_to_gn.py",
[ rebase_path("chromeos.gyp") ],
"scope",
[ "chromeos.gyp" ])
component("chromeos") {
configs += [ "//net/third_party/nss/ssl:ssl_config" ]
public_deps = [
"//dbus",
]
deps = [
"//base",
"//base:prefs",
"//base/third_party/dynamic_annotations",
"//chromeos/ime:gencode",
"//components/policy/proto",
"//components/onc",
"//crypto",
"//google_apis",
"//net/third_party/nss/ssl:libssl",
"//third_party/icu",
"//third_party/libxml",
"//third_party/protobuf:protobuf_lite",
"//ui/accelerometer",
"//url",
":cryptohome_proto",
":power_manager_proto",
]
sources = gypi_values.chromeos_sources
defines = [ "CHROMEOS_IMPLEMENTATION" ]
}
static_library("test_support") {
testonly = true
configs += [ "//build/config/linux:dbus" ]
deps = [
"//testing/gmock",
":chromeos",
":cryptohome_proto",
":power_manager_proto",
":test_support_without_gmock",
]
sources = [
"attestation/mock_attestation_flow.cc",
"attestation/mock_attestation_flow.h",
"chromeos_test_utils.cc",
"chromeos_test_utils.h",
"cryptohome/mock_async_method_caller.cc",
"cryptohome/mock_async_method_caller.h",
"cryptohome/mock_homedir_methods.cc",
"cryptohome/mock_homedir_methods.h",
"dbus/mock_cryptohome_client.cc",
"dbus/mock_cryptohome_client.h",
"dbus/mock_lorgnette_manager_client.cc",
"dbus/mock_lorgnette_manager_client.h",
"dbus/mock_session_manager_client.cc",
"dbus/mock_session_manager_client.h",
"dbus/mock_shill_manager_client.cc",
"dbus/mock_shill_manager_client.h",
"dbus/mock_shill_profile_client.cc",
"dbus/mock_shill_profile_client.h",
"dbus/mock_shill_service_client.cc",
"dbus/mock_shill_service_client.h",
"dbus/services/service_provider_test_helper.cc",
"dbus/services/service_provider_test_helper.h",
"disks/mock_disk_mount_manager.cc",
"disks/mock_disk_mount_manager.h",
"login/auth/mock_auth_attempt_state_resolver.cc",
"login/auth/mock_auth_attempt_state_resolver.h",
"login/auth/mock_auth_status_consumer.cc",
"login/auth/mock_auth_status_consumer.h",
"login/auth/mock_authenticator.cc",
"login/auth/mock_authenticator.h",
"login/auth/mock_url_fetchers.cc",
"login/auth/mock_url_fetchers.h",
"network/fake_network_device_handler.cc",
"network/fake_network_device_handler.h",
"network/mock_managed_network_configuration_handler.cc",
"network/mock_managed_network_configuration_handler.h",
"network/onc/onc_test_utils.cc",
"network/onc/onc_test_utils.h",
"system/fake_statistics_provider.cc",
"system/fake_statistics_provider.h",
]
}
static_library("test_support_without_gmock") {
testonly = true
configs += [ "//build/config/linux:dbus" ]
deps = [
"//crypto",
":chromeos",
":cryptohome_proto",
":power_manager_proto",
]
sources = [
"dbus/fake_cros_disks_client.cc",
"dbus/fake_cros_disks_client.h",
"dbus/fake_power_manager_client.cc",
"dbus/fake_power_manager_client.h",
"dbus/fake_session_manager_client.cc",
"dbus/fake_session_manager_client.h",
"dbus/fake_shill_manager_client.cc",
"dbus/fake_shill_manager_client.h",
"dbus/fake_update_engine_client.cc",
"dbus/fake_update_engine_client.h",
]
}
test("chromeos_unittests") {
configs += [
"//build/config/linux:dbus",
"//net/third_party/nss/ssl:ssl_config",
]
deps = [
"//base:prefs_test_support",
"//base/test:run_all_unittests",
"//base/test:test_support",
"//components/onc",
"//content/test:test_support",
"//crypto",
"//crypto:test_support",
"//dbus:test_support",
"//google_apis",
"//net",
"//net:test_support",
"//testing/gmock",
"//testing/gtest",
"//url",
":cryptohome_proto",
":power_manager_proto",
":test_support",
]
sources = gypi_values.chromeos_test_sources
if (use_allocator != "none") {
deps += [ "//base/allocator" ]
}
if (use_x11) {
deps += [ "//ui/gfx/x" ]
}
}
proto_library("power_manager_proto") {
sources = [
"//third_party/cros_system_api/dbus/power_manager/input_event.proto",
"//third_party/cros_system_api/dbus/power_manager/peripheral_battery_status.proto",
"//third_party/cros_system_api/dbus/power_manager/policy.proto",
"//third_party/cros_system_api/dbus/power_manager/power_supply_properties.proto",
"//third_party/cros_system_api/dbus/power_manager/suspend.proto",
]
proto_out_dir = "chromeos/dbus/power_manager"
}
proto_library("cryptohome_proto") {
sources = [
"//third_party/cros_system_api/dbus/cryptohome/key.proto",
"//third_party/cros_system_api/dbus/cryptohome/rpc.proto",
]
proto_out_dir = "chromeos/dbus/cryptohome"
}
proto_library("cryptohome_signkey_proto") {
sources = [
"//third_party/cros_system_api/dbus/cryptohome/signed_secret.proto",
]
proto_out_dir = "chromeos/cryptohome"
}
|