OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 | 6 |
7 if (is_android) { | 7 if (is_android) { |
8 import("//build/config/android/rules.gni") # For generate_jni(). | 8 import("//build/config/android/rules.gni") # For generate_jni(). |
9 } | 9 } |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 testonly = true | 139 testonly = true |
140 | 140 |
141 java_files = [ "android/java/org/chromium/device/geolocation/MockLocationPro
vider.java" ] | 141 java_files = [ "android/java/org/chromium/device/geolocation/MockLocationPro
vider.java" ] |
142 deps = [ | 142 deps = [ |
143 ":geolocation_java", | 143 ":geolocation_java", |
144 "//base:base_java", | 144 "//base:base_java", |
145 ] | 145 ] |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
| 149 source_set("test_support") { |
| 150 testonly = true |
| 151 |
| 152 sources = [ |
| 153 "fake_access_token_store.cc", |
| 154 "fake_access_token_store.h", |
| 155 "fake_location_provider.cc", |
| 156 "fake_location_provider.h", |
| 157 "mock_location_provider.cc", |
| 158 "mock_location_provider.h", |
| 159 ] |
| 160 public_deps = [ |
| 161 ":device_geolocation", |
| 162 ] |
| 163 deps = [ |
| 164 "//testing/gmock", |
| 165 "//testing/gtest", |
| 166 ] |
| 167 } |
| 168 |
149 source_set("unittests") { | 169 source_set("unittests") { |
150 testonly = true | 170 testonly = true |
151 | 171 |
152 sources = [ | 172 sources = [ |
153 "fake_access_token_store.cc", | |
154 "fake_access_token_store.h", | |
155 "geolocation_provider_impl_unittest.cc", | 173 "geolocation_provider_impl_unittest.cc", |
156 "location_arbitrator_impl_unittest.cc", | 174 "location_arbitrator_impl_unittest.cc", |
157 "mock_location_provider.cc", | |
158 "mock_location_provider.h", | |
159 "network_location_provider_unittest.cc", | 175 "network_location_provider_unittest.cc", |
160 "wifi_data_provider_chromeos_unittest.cc", | 176 "wifi_data_provider_chromeos_unittest.cc", |
161 "wifi_data_provider_common_unittest.cc", | 177 "wifi_data_provider_common_unittest.cc", |
162 "wifi_data_provider_linux_unittest.cc", | 178 "wifi_data_provider_linux_unittest.cc", |
163 "wifi_data_provider_win_unittest.cc", | 179 "wifi_data_provider_win_unittest.cc", |
164 ] | 180 ] |
165 public_deps = [ | 181 public_deps = [ |
166 ":device_geolocation", | 182 ":device_geolocation", |
167 ] | 183 ] |
168 deps = [ | 184 deps = [ |
| 185 ":test_support", |
169 "//base", | 186 "//base", |
170 "//base/third_party/dynamic_annotations", | 187 "//base/third_party/dynamic_annotations", |
171 "//net:test_support", | 188 "//net:test_support", |
172 "//testing/gmock", | 189 "//testing/gmock", |
173 "//testing/gtest", | 190 "//testing/gtest", |
174 ] | 191 ] |
175 | 192 |
176 if (is_linux) { | 193 if (is_linux) { |
177 if (use_dbus) { | 194 if (use_dbus) { |
178 deps += [ "//dbus:test_support" ] | 195 deps += [ "//dbus:test_support" ] |
179 } else { | 196 } else { |
180 sources -= [ "wifi_data_provider_linux_unittest.cc" ] | 197 sources -= [ "wifi_data_provider_linux_unittest.cc" ] |
181 } | 198 } |
182 } | 199 } |
183 | 200 |
184 if (is_chromeos) { | 201 if (is_chromeos) { |
185 sources -= [ "wifi_data_provider_linux_unittest.cc" ] | 202 sources -= [ "wifi_data_provider_linux_unittest.cc" ] |
186 deps += [ "//chromeos" ] | 203 deps += [ "//chromeos" ] |
187 } | 204 } |
188 | 205 |
189 if (is_android) { | 206 if (is_android) { |
190 sources -= [ | 207 sources -= [ |
191 "network_location_provider_unittest.cc", | 208 "network_location_provider_unittest.cc", |
192 "wifi_data_provider_common_unittest.cc", | 209 "wifi_data_provider_common_unittest.cc", |
193 ] | 210 ] |
194 deps += [ ":geolocation_java_test_support" ] | 211 deps += [ ":geolocation_java_test_support" ] |
195 } | 212 } |
196 } | 213 } |
OLD | NEW |