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")
8 import("//build/config/android/rules.gni")
11 # Shared sources between url and url_lib_use_icu_alternatives_on_android.
12 url_shared_sources = [
17 "scheme_host_port.cc",
19 "third_party/mozilla/url_parse.cc",
20 "third_party/mozilla/url_parse.h",
23 "url_canon_filesystemurl.cc",
24 "url_canon_fileurl.cc",
26 "url_canon_internal.cc",
27 "url_canon_internal.h",
28 "url_canon_internal_file.h",
31 "url_canon_mailtourl.cc",
33 "url_canon_pathurl.cc",
35 "url_canon_relative.cc",
36 "url_canon_stdstring.cc",
37 "url_canon_stdstring.h",
38 "url_canon_stdurl.cc",
44 "url_parse_internal.h",
50 sources = url_shared_sources + [
56 # Don't conflict with Windows' "url.dll".
57 output_name = "url_lib"
59 defines = [ "URL_IMPLEMENTATION" ]
62 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
63 "//build/config/compiler:no_size_t_to_int_warning",
68 "//base/third_party/dynamic_annotations",
69 "//third_party/icu:icudata",
75 generate_jni("url_jni_headers") {
77 "android/java/src/org/chromium/url/IDNStringUtil.java",
82 component("url_lib_use_icu_alternatives_on_android") {
83 sources = url_shared_sources + [
84 "android/url_jni_registrar.cc",
85 "android/url_jni_registrar.h",
86 "url_canon_icu_alternatives_android.cc",
87 "url_canon_icu_alternatives_android.h",
92 "USE_ICU_ALTERNATIVES_ON_ANDROID=1",
96 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
97 "//build/config/compiler:no_size_t_to_int_warning",
103 "//base/third_party/dynamic_annotations",
108 # TODO(dpranke): crbug.com/360936. Get this to build and run on Android.
110 # TODO(GYP): Delete this after we've converted everything to GN.
111 # The _run targets exist only for compatibility w/ GYP.
112 group("url_unittests_run") {
119 test("url_unittests") {
122 "origin_unittest.cc",
123 "scheme_host_port_unittest.cc",
124 "url_canon_icu_unittest.cc",
125 "url_canon_unittest.cc",
126 "url_parse_unittest.cc",
128 "url_util_unittest.cc",
131 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
132 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
134 #if (is_posix && !is_mac && !is_ios) {
135 # if (use_allocator!="none") {
136 # deps += "//base/allocator"
143 "//base/test:run_all_unittests",
145 "//third_party/icu:icuuc",