[chromedriver] Explicitly set page loading state when document.readyState != "complete".
[chromium-blink-merge.git] / google_apis / gcm / BUILD.gn
blob1d36bc7dadd60a2609428d930f9b451cb9971b9a
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("//testing/test.gni")
6 import("//third_party/protobuf/proto_library.gni")
8 component("gcm") {
9   sources = [
10     "base/gcm_util.cc",
11     "base/gcm_util.h",
12     "base/mcs_message.cc",
13     "base/mcs_message.h",
14     "base/mcs_util.cc",
15     "base/mcs_util.h",
16     "base/socket_stream.cc",
17     "base/socket_stream.h",
18     "engine/account_mapping.cc",
19     "engine/account_mapping.h",
20     "engine/checkin_request.cc",
21     "engine/checkin_request.h",
22     "engine/connection_factory.cc",
23     "engine/connection_factory.h",
24     "engine/connection_factory_impl.cc",
25     "engine/connection_factory_impl.h",
26     "engine/connection_handler.cc",
27     "engine/connection_handler.h",
28     "engine/connection_handler_impl.cc",
29     "engine/connection_handler_impl.h",
30     "engine/gcm_registration_request_handler.cc",
31     "engine/gcm_registration_request_handler.h",
32     "engine/gcm_store.cc",
33     "engine/gcm_store.h",
34     "engine/gcm_store_impl.cc",
35     "engine/gcm_store_impl.h",
36     "engine/gcm_unregistration_request_handler.cc",
37     "engine/gcm_unregistration_request_handler.h",
38     "engine/gservices_settings.cc",
39     "engine/gservices_settings.h",
40     "engine/gservices_switches.cc",
41     "engine/gservices_switches.h",
42     "engine/heartbeat_manager.cc",
43     "engine/heartbeat_manager.h",
44     "engine/instance_id_delete_token_request_handler.cc",
45     "engine/instance_id_delete_token_request_handler.h",
46     "engine/instance_id_get_token_request_handler.cc",
47     "engine/instance_id_get_token_request_handler.h",
48     "engine/mcs_client.cc",
49     "engine/mcs_client.h",
50     "engine/registration_request.cc",
51     "engine/registration_request.h",
52     "engine/unregistration_request.cc",
53     "engine/unregistration_request.h",
54     "monitoring/gcm_stats_recorder.h",
55   ]
57   defines = [ "GCM_IMPLEMENTATION" ]
59   public_deps = [
60     ":proto",
61   ]
62   deps = [
63     "//base",
64     "//base/third_party/dynamic_annotations",
65     "//net",
66     "//third_party/leveldatabase",
67     "//url",
68   ]
71 proto_library("proto") {
72   # This is part of the gcm component.
73   visibility = [ ":gcm" ]
74   sources = [
75     "protocol/android_checkin.proto",
76     "protocol/checkin.proto",
77     "protocol/mcs.proto",
78   ]
80   cc_generator_options = "dllexport_decl=GCM_EXPORT:"
81   cc_include = "google_apis/gcm/base/gcm_export.h"
82   defines = [ "GCM_IMPLEMENTATION" ]
85 source_set("test_support") {
86   testonly = true
87   sources = [
88     "base/fake_encryptor.cc",
89     "base/fake_encryptor.h",
90     "engine/fake_connection_factory.cc",
91     "engine/fake_connection_factory.h",
92     "engine/fake_connection_handler.cc",
93     "engine/fake_connection_handler.h",
94     "monitoring/fake_gcm_stats_recorder.cc",
95     "monitoring/fake_gcm_stats_recorder.h",
96   ]
98   public_deps = [
99     ":gcm",
100   ]
101   deps = [
102     "//base",
103     "//net",
104     "//testing/gtest",
105   ]
108 # A standalone MCS (mobile connection server) client.
109 executable("mcs_probe") {
110   testonly = true
111   sources = [
112     "tools/mcs_probe.cc",
113   ]
115   deps = [
116     ":gcm",
117     ":test_support",
118     "//base",
119     "//net",
120     "//net:test_support",
121     "//third_party/protobuf:protobuf_lite",
122   ]
125 test("gcm_unit_tests") {
126   sources = [
127     "base/mcs_message_unittest.cc",
128     "base/mcs_util_unittest.cc",
129     "base/socket_stream_unittest.cc",
130     "engine/account_mapping_unittest.cc",
131     "engine/checkin_request_unittest.cc",
132     "engine/connection_factory_impl_unittest.cc",
133     "engine/connection_handler_impl_unittest.cc",
134     "engine/gcm_request_test_base.cc",
135     "engine/gcm_request_test_base.h",
136     "engine/gcm_store_impl_unittest.cc",
137     "engine/gservices_settings_unittest.cc",
138     "engine/heartbeat_manager_unittest.cc",
139     "engine/mcs_client_unittest.cc",
140     "engine/registration_request_unittest.cc",
141     "engine/unregistration_request_unittest.cc",
142   ]
144   deps = [
145     ":gcm",
146     ":test_support",
147     "//base",
148     "//base/test:run_all_unittests",
149     "//net",
150     "//net:test_support",
151     "//testing/gtest",
152     "//third_party/protobuf:protobuf_lite",
153   ]