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