blob: 9b707d78fa189eba6930a7599590b05b0a455e6a [file] [log] [blame]
# Copyright 2014 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/config/android/config.gni")
import("//build/config/android/rules.gni")
android_library("net_java") {
java_files = [
"java/src/org/chromium/net/AndroidCellularSignalStrength.java",
"java/src/org/chromium/net/AndroidCertVerifyResult.java",
"java/src/org/chromium/net/AndroidKeyStore.java",
"java/src/org/chromium/net/AndroidNetworkLibrary.java",
"java/src/org/chromium/net/AndroidTrafficStats.java",
"java/src/org/chromium/net/GURLUtils.java",
"java/src/org/chromium/net/HttpNegotiateAuthenticator.java",
"java/src/org/chromium/net/HttpNegotiateConstants.java",
"java/src/org/chromium/net/NetStringUtil.java",
"java/src/org/chromium/net/NetworkChangeNotifier.java",
"java/src/org/chromium/net/NetworkChangeNotifierAutoDetect.java",
"java/src/org/chromium/net/ProxyChangeListener.java",
"java/src/org/chromium/net/RegistrationPolicyAlwaysRegister.java",
"java/src/org/chromium/net/RegistrationPolicyApplicationStatus.java",
"java/src/org/chromium/net/X509Util.java",
]
deps = [
"//base:base_java",
"//third_party/android_tools:android_support_annotations_java",
]
srcjar_deps = [
":net_errors_java",
":net_android_java_enums_srcjar",
]
}
android_aidl("embedded_test_server_aidl") {
interface_file = "../test/android/javatests/src/org/chromium/net/test/IEmbeddedTestServerInterface.aidl"
sources = [
"../test/android/javatests/src/org/chromium/net/test/IEmbeddedTestServerImpl.aidl",
]
}
android_library("net_java_test_support") {
testonly = true
java_files = [
"../test/android/javatests/src/org/chromium/net/test/BaseHttpTestServer.java",
"../test/android/javatests/src/org/chromium/net/test/BaseTcpTestServer.java",
"../test/android/javatests/src/org/chromium/net/test/BaseTestServer.java",
"../test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticator.java",
"../test/android/javatests/src/org/chromium/net/test/DummySpnegoAuthenticatorService.java",
"../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java",
"../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerImpl.java",
"../test/android/javatests/src/org/chromium/net/test/EmbeddedTestServerService.java",
"../test/android/javatests/src/org/chromium/net/test/TestServerBuilder.java",
"../test/android/javatests/src/org/chromium/net/test/TestServerSpawner.java",
"../test/android/javatests/src/org/chromium/net/test/util/CertTestUtil.java",
"../test/android/javatests/src/org/chromium/net/test/util/NetworkChangeNotifierTestUtil.java",
"../test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java",
]
deps = [
":net_java",
"//base:base_java",
"//base:base_java_test_support",
"//third_party/android_tools:android_support_annotations_java",
"//third_party/android_tools:legacy_http_javalib",
]
srcjar_deps = [
":embedded_test_server_aidl",
":net_java_test_support_enums_srcjar",
]
}
source_set("java_test_native_support") {
testonly = true
sources = [
"../test/android/net_test_entry_point.cc",
"../test/android/net_test_jni_onload.cc",
"../test/android/net_test_jni_onload.h",
"../test/embedded_test_server/android/embedded_test_server_android.cc",
"../test/embedded_test_server/android/embedded_test_server_android.h",
]
deps = [
"//net:test_support",
]
public_deps = [
"//net:net_test_jni_headers",
]
}
shared_library("net_java_test_native_support") {
testonly = true
deps = [
":java_test_native_support",
"//net:test_support",
]
}
android_apk("net_test_support_apk") {
testonly = true
deps = [
":net_java_test_support",
"//base:base_java",
]
android_manifest = "../test/android/javatests/AndroidManifest.xml"
apk_name = "ChromiumNetTestSupport"
shared_libraries = [ ":net_java_test_native_support" ]
}
android_resources("net_unittests_apk_resources") {
resource_dirs = [ "unittest_support/res" ]
custom_package = "org.chromium.native_test"
}
android_library("net_javatests") {
testonly = true
java_files = [
"javatests/src/org/chromium/net/AndroidKeyStoreTestUtil.java",
"javatests/src/org/chromium/net/AndroidProxySelectorTest.java",
"javatests/src/org/chromium/net/NetErrorsTest.java",
"javatests/src/org/chromium/net/NetworkChangeNotifierTest.java",
"javatests/src/org/chromium/net/X509UtilTest.java",
]
deps = [
":net_java",
":net_java_test_support",
"//base:base_java",
"//base:base_java_test_support",
]
}
java_cpp_template("net_errors_java") {
package_name = "org/chromium/net"
sources = [
"java/NetError.template",
]
inputs = [
"../base/net_error_list.h",
]
}
java_cpp_enum("net_java_test_support_enums_srcjar") {
sources = [
"../test/url_request/url_request_failed_job.h",
]
}
java_cpp_enum("net_android_java_enums_srcjar") {
sources = [
"../base/mime_util.h",
"../base/network_change_notifier.h",
"cellular_signal_strength.cc",
"cert_verify_result_android.h",
"keystore.h",
"network_change_notifier_android.cc",
"traffic_stats.cc",
]
}
junit_binary("net_junit_tests") {
java_files =
[ "junit/src/org/chromium/net/HttpNegotiateAuthenticatorTest.java" ]
deps = [
":net_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
"//third_party/junit:hamcrest",
]
}