OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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("//testing/test.gni") | 5 import("//testing/test.gni") |
6 import("//build/config/locales.gni") | 6 import("//build/config/locales.gni") |
7 import("//tools/grit/grit_rule.gni") | 7 import("//tools/grit/grit_rule.gni") |
8 | 8 |
9 config("internal_config") { | 9 config("no-newline-eof-warning") { |
10 if (is_clang) { | 10 if (is_clang) { |
11 cflags = [ | 11 cflags = [ "-Wno-newline-eof" ] |
12 "-Wno-newline-eof", | |
13 | |
14 # md5.cc uses "register". TODO(thakis): Fix. | |
15 "-Wno-deprecated-register", | |
16 ] | |
17 } | 12 } |
18 } | 13 } |
19 | 14 |
20 grit("strings") { | 15 grit("strings") { |
21 source = "//chrome/app/address_input_strings.grd" | 16 source = "//chrome/app/address_input_strings.grd" |
22 | 17 |
23 # libaddressinput's tests just say `#include "messages.h"`. | 18 # libaddressinput's tests just say `#include "messages.h"`. |
24 use_qualified_include = false | 19 use_qualified_include = false |
25 | 20 |
26 outputs = [ | 21 outputs = [ |
27 "messages.h", | 22 "messages.h", |
28 "en_messages.cc", | 23 "en_messages.cc", |
29 ] | 24 ] |
30 foreach(locale, locales_with_fake_bidi) { | 25 foreach(locale, locales_with_fake_bidi) { |
31 outputs += [ "address_input_strings_$locale.pak" ] | 26 outputs += [ "address_input_strings_$locale.pak" ] |
32 } | 27 } |
33 | 28 |
34 configs = [ ":internal_config" ] | 29 configs = [ ":no-newline-eof-warning" ] |
35 } | 30 } |
36 | 31 |
37 config("libaddressinput_config") { | 32 config("libaddressinput_config") { |
38 defines = [ | 33 defines = [ |
39 "I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1", | 34 "I18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1", |
40 "I18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-ag
gregate-address/\"", | 35 "I18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-ag
gregate-address/\"", |
41 ] | 36 ] |
42 include_dirs = [ | 37 include_dirs = [ |
43 "src/cpp/include", | 38 "src/cpp/include", |
44 "chromium/override", | 39 "chromium/override", |
(...skipping 17 matching lines...) Expand all Loading... |
62 "src/cpp/src/lookup_key.cc", | 57 "src/cpp/src/lookup_key.cc", |
63 "src/cpp/src/region_data_constants.cc", | 58 "src/cpp/src/region_data_constants.cc", |
64 "src/cpp/src/rule.cc", | 59 "src/cpp/src/rule.cc", |
65 "src/cpp/src/util/cctype_tolower_equal.cc", | 60 "src/cpp/src/util/cctype_tolower_equal.cc", |
66 "src/cpp/src/util/string_split.cc", | 61 "src/cpp/src/util/string_split.cc", |
67 "src/cpp/src/util/string_util.cc", | 62 "src/cpp/src/util/string_util.cc", |
68 ] | 63 ] |
69 | 64 |
70 configs -= [ "//build/config/compiler:chromium_code" ] | 65 configs -= [ "//build/config/compiler:chromium_code" ] |
71 configs += [ | 66 configs += [ |
72 ":internal_config", | 67 ":no-newline-eof-warning", |
73 "//build/config/compiler:no_chromium_code", | 68 "//build/config/compiler:no_chromium_code", |
74 ] | 69 ] |
75 | 70 |
76 public_configs = [ ":libaddressinput_config" ] | 71 public_configs = [ ":libaddressinput_config" ] |
77 | 72 |
78 include_dirs = [ "$root_gen_dir/third_party/libaddressinput" ] | 73 include_dirs = [ "$root_gen_dir/third_party/libaddressinput" ] |
79 | 74 |
80 deps = [ | 75 deps = [ |
81 ":strings", | 76 ":strings", |
82 "//base", | 77 "//base", |
(...skipping 27 matching lines...) Expand all Loading... |
110 "src/cpp/src/region_data_builder.cc", | 105 "src/cpp/src/region_data_builder.cc", |
111 "src/cpp/src/retriever.cc", | 106 "src/cpp/src/retriever.cc", |
112 "src/cpp/src/rule_retriever.cc", | 107 "src/cpp/src/rule_retriever.cc", |
113 "src/cpp/src/util/md5.cc", | 108 "src/cpp/src/util/md5.cc", |
114 "src/cpp/src/validating_storage.cc", | 109 "src/cpp/src/validating_storage.cc", |
115 "src/cpp/src/validating_util.cc", | 110 "src/cpp/src/validating_util.cc", |
116 "src/cpp/src/validation_task.cc", | 111 "src/cpp/src/validation_task.cc", |
117 ] | 112 ] |
118 | 113 |
119 configs -= [ "//build/config/compiler:chromium_code" ] | 114 configs -= [ "//build/config/compiler:chromium_code" ] |
120 configs += [ | 115 configs += [ "//build/config/compiler:no_chromium_code" ] |
121 ":internal_config", | |
122 "//build/config/compiler:no_chromium_code", | |
123 ] | |
124 | 116 |
125 public_configs = [ ":libaddressinput_config" ] | 117 public_configs = [ ":libaddressinput_config" ] |
126 | 118 |
127 deps = [ | 119 deps = [ |
128 ":strings", | 120 ":strings", |
129 ":util", | 121 ":util", |
130 "//base", | 122 "//base", |
131 "//base:i18n", | 123 "//base:i18n", |
132 "//components/prefs", | 124 "//components/prefs", |
133 "//net", | 125 "//net", |
134 "//third_party/icu", | 126 "//third_party/icu", |
135 "//third_party/re2", | 127 "//third_party/re2", |
136 ] | 128 ] |
137 } | 129 } |
138 | 130 |
139 # This target provides utilities for tests of libaddressinput. | 131 # This target provides utilities for tests of libaddressinput. |
140 source_set("test_support") { | 132 source_set("test_support") { |
141 testonly = true | 133 testonly = true |
142 sources = [ | 134 sources = [ |
143 "src/cpp/test/fake_storage.cc", | 135 "src/cpp/test/fake_storage.cc", |
144 "src/cpp/test/mock_source.cc", | 136 "src/cpp/test/mock_source.cc", |
145 "src/cpp/test/testdata_source.cc", | 137 "src/cpp/test/testdata_source.cc", |
146 ] | 138 ] |
147 | 139 |
148 configs -= [ "//build/config/compiler:chromium_code" ] | 140 configs -= [ "//build/config/compiler:chromium_code" ] |
149 configs += [ | 141 configs += [ "//build/config/compiler:no_chromium_code" ] |
150 ":internal_config", | |
151 "//build/config/compiler:no_chromium_code", | |
152 ] | |
153 | 142 |
154 defines = [ "TEST_DATA_DIR=\"src/third_party/libaddressinput/src/testdata\"" ] | 143 defines = [ "TEST_DATA_DIR=\"src/third_party/libaddressinput/src/testdata\"" ] |
155 | 144 |
156 include_dirs = [ "src/cpp/src" ] | 145 include_dirs = [ "src/cpp/src" ] |
157 | 146 |
158 deps = [ | 147 deps = [ |
159 ":libaddressinput", | 148 ":libaddressinput", |
160 ] | 149 ] |
161 } | 150 } |
162 | 151 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 "src/cpp/test/validation_task_test.cc", | 197 "src/cpp/test/validation_task_test.cc", |
209 ] | 198 ] |
210 | 199 |
211 if (is_ios) { | 200 if (is_ios) { |
212 # TODO(rouslan): This tests uses ASSERT_DEATH which is not supported on | 201 # TODO(rouslan): This tests uses ASSERT_DEATH which is not supported on |
213 # iOS. Re-enable once http://crbug.com/595645 is fixed. | 202 # iOS. Re-enable once http://crbug.com/595645 is fixed. |
214 sources -= [ "src/cpp/test/address_data_test.cc" ] | 203 sources -= [ "src/cpp/test/address_data_test.cc" ] |
215 } | 204 } |
216 | 205 |
217 configs -= [ "//build/config/compiler:chromium_code" ] | 206 configs -= [ "//build/config/compiler:chromium_code" ] |
218 configs += [ | 207 configs += [ "//build/config/compiler:no_chromium_code" ] |
219 ":internal_config", | |
220 "//build/config/compiler:no_chromium_code", | |
221 ] | |
222 | 208 |
223 include_dirs = [ "src/cpp/src" ] | 209 include_dirs = [ "src/cpp/src" ] |
224 | 210 |
225 deps = [ | 211 deps = [ |
226 ":libaddressinput", | 212 ":libaddressinput", |
227 ":strings", | 213 ":strings", |
228 ":test_support", | 214 ":test_support", |
229 "//base/test:run_all_unittests", | 215 "//base/test:run_all_unittests", |
230 "//components/prefs", | 216 "//components/prefs", |
231 "//net:test_support", | 217 "//net:test_support", |
232 "//testing/gtest", | 218 "//testing/gtest", |
233 ] | 219 ] |
234 } | 220 } |
OLD | NEW |