blob: 39847d9aadee6b5708b8e290a2b361634ffe84cf [file] [log] [blame]
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/package.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
static_library("url") {
# We limit the visibility of this library because we will eventually need to
# remove or replace this library.
#
# Please do not add any more entries to this list.
visibility = [
"//src/lib",
":*",
"//examples/media/playback/audio_player:*",
"//garnet/bin/http:*",
"//src/media/playback/mediaplayer:*",
"//topaz/examples/mediaplayer/mediaplayer_skia:*",
]
sources = [
"gurl.cc",
"gurl.h",
"third_party/mozilla/url_parse.cc",
"third_party/mozilla/url_parse.h",
"url_canon.h",
"url_canon_etc.cc",
"url_canon_fileurl.cc",
"url_canon_host.cc",
"url_canon_icu.cc",
"url_canon_icu.h",
"url_canon_internal.cc",
"url_canon_internal.h",
"url_canon_internal_file.h",
"url_canon_ip.cc",
"url_canon_ip.h",
"url_canon_mailtourl.cc",
"url_canon_path.cc",
"url_canon_pathurl.cc",
"url_canon_query.cc",
"url_canon_relative.cc",
"url_canon_stdstring.cc",
"url_canon_stdstring.h",
"url_canon_stdurl.cc",
"url_constants.cc",
"url_constants.h",
"url_export.h",
"url_file.h",
"url_parse_file.cc",
"url_parse_internal.h",
"url_util.cc",
"url_util.h",
]
defines = [ "URL_IMPLEMENTATION" ]
deps = [
"//third_party/icu",
]
public_deps = [
"//src/lib/fxl",
]
}
source_set("url_unittests_main") {
testonly = true
sources = [
"url_unittests_main.cc",
]
deps = [
"//src/lib/fxl",
"//src/lib/fxl/test:test_settings",
"//src/lib/icu_data/cpp",
"//third_party/googletest:gtest",
"//third_party/icu",
]
}
executable("url_unittests") {
testonly = true
sources = [
"gurl_unittest.cc",
"url_canon_icu_unittest.cc",
"url_canon_unittest.cc",
"url_parse_unittest.cc",
"url_test_utils.h",
"url_util_unittest.cc",
]
deps = [
":url",
":url_unittests_main",
"//third_party/googletest:gtest",
"//third_party/icu",
]
}
test_package("url_tests") {
deps = [
":url_unittests",
]
resources = [
{
path = rebase_path("//third_party/icu/common/icudtl.dat")
dest = "icudtl.dat"
},
]
tests = [
{
name = "url_unittests"
environments = basic_envs
},
]
}