Add DumpAccessibilityEvents test framework.
[chromium-blink-merge.git] / dbus / BUILD.gn
blob4e8697c7d5dd1b544d50947af16abcd675b9528e
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//third_party/protobuf/proto_library.gni")
7 component("dbus") {
8   sources = [
9     "bus.cc",
10     "bus.h",
11     "dbus_export.h",
12     "dbus_statistics.cc",
13     "dbus_statistics.h",
14     "exported_object.cc",
15     "exported_object.h",
16     "file_descriptor.cc",
17     "file_descriptor.h",
18     "message.cc",
19     "message.h",
20     "object_manager.cc",
21     "object_manager.h",
22     "object_path.cc",
23     "object_path.h",
24     "object_proxy.cc",
25     "object_proxy.h",
26     "property.cc",
27     "property.h",
28     "scoped_dbus_error.cc",
29     "scoped_dbus_error.h",
30     "string_util.cc",
31     "string_util.h",
32     "values_util.cc",
33     "values_util.h",
34     "util.cc",
35     "util.h",
36   ]
38   defines = [ "DBUS_IMPLEMENTATION" ]
40   deps = [
41     "//base",
42     "//third_party/protobuf:protobuf_lite",
43   ]
45   public_configs = [ "//build/config/linux:dbus" ]
48 proto_library("test_proto") {
49   sources = [
50     "test_proto.proto",
51   ]
54 # This target contains mocks that can be used to write unit tests without
55 # issuing actual D-Bus calls.
56 source_set("test_support") {
57   testonly = true
58   sources = [
59     "mock_bus.cc",
60     "mock_bus.h",
61     "mock_exported_object.cc",
62     "mock_exported_object.h",
63     "mock_object_manager.cc",
64     "mock_object_manager.h",
65     "mock_object_proxy.cc",
66     "mock_object_proxy.h",
67   ]
69   deps = [
70     ":dbus",
71     "//testing/gmock",
72   ]
74   configs += [ "//build/config/linux:dbus" ]
77 test("dbus_unittests") {
78   sources = [
79     "bus_unittest.cc",
80     "dbus_statistics_unittest.cc",
81     "end_to_end_async_unittest.cc",
82     "end_to_end_sync_unittest.cc",
83     "message_unittest.cc",
84     "mock_unittest.cc",
85     "object_manager_unittest.cc",
86     "object_proxy_unittest.cc",
87     "property_unittest.cc",
88     "run_all_unittests.cc",
89     "signal_sender_verification_unittest.cc",
90     "string_util_unittest.cc",
91     "test_service.cc",
92     "test_service.h",
93     "util_unittest.cc",
94     "values_util_unittest.cc",
95   ]
97   deps = [
98     ":dbus",
99     ":test_proto",
100     ":test_support",
101     "//base/test:test_support",
102     "//testing/gmock",
103     "//testing/gtest",
104     "//third_party/protobuf:protobuf_lite",
105   ]
107   configs += [ "//build/config/linux:dbus" ]
110 executable("dbus_test_server") {
111   testonly = true
112   sources = [
113     "test_server.cc",
114     "test_service.cc",
115     "test_service.h",
116   ]
118   deps = [
119     ":dbus",
120     "//base",
121     "//base/test:test_support",
122   ]
124   configs += [ "//build/config/linux:dbus" ]