1 # Copyright (c) 2013 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("//url/config.gni")
8 # Sets the USE_ICU_ALTERNATIVES_ON_ANDROID define based on the build flag.
9 config("url_icu_config") {
10 if (use_icu_alternatives_on_android) {
11 defines = [ "USE_ICU_ALTERNATIVES_ON_ANDROID=1" ]
17 # Don't conflict with Windows' "url.dll".
18 output_name = "url_lib"
21 "android/url_jni_registrar.cc",
22 "android/url_jni_registrar.h",
27 "scheme_host_port.cc",
29 "third_party/mozilla/url_parse.cc",
30 "third_party/mozilla/url_parse.h",
33 "url_canon_filesystemurl.cc",
34 "url_canon_fileurl.cc",
38 "url_canon_internal.cc",
39 "url_canon_internal.h",
40 "url_canon_internal_file.h",
43 "url_canon_mailtourl.cc",
45 "url_canon_pathurl.cc",
47 "url_canon_relative.cc",
48 "url_canon_stdstring.cc",
49 "url_canon_stdstring.h",
50 "url_canon_stdurl.cc",
56 "url_parse_internal.h",
61 defines = [ "URL_IMPLEMENTATION" ]
66 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
67 "//build/config/compiler:no_size_t_to_int_warning",
72 "//base/third_party/dynamic_annotations",
73 "//third_party/icu:icudata",
77 if (use_icu_alternatives_on_android) {
83 "//third_party/icu:icudata",
88 "url_canon_icu_alternatives_android.cc",
89 "url_canon_icu_alternatives_android.h",
94 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android.
96 # TODO(GYP): Delete this after we've converted everything to GN.
97 # The _run targets exist only for compatibility w/ GYP.
98 group("url_unittests_run") {
105 test("url_unittests") {
108 "origin_unittest.cc",
109 "scheme_host_port_unittest.cc",
110 "url_canon_icu_unittest.cc",
111 "url_canon_unittest.cc",
112 "url_parse_unittest.cc",
114 "url_util_unittest.cc",
117 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
118 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
120 #if (is_posix && !is_mac && !is_ios) {
121 # if (use_allocator!="none") {
122 # deps += "//base/allocator"
129 "//base/test:run_all_unittests",
131 "//third_party/icu:icuuc",
134 if (use_icu_alternatives_on_android) {
135 sources -= [ "url_canon_icu_unittest.cc" ]
136 deps -= [ "//third_party/icu:icuuc" ]