Commit 61d6bc57 authored by Misha Efimov's avatar Misha Efimov Committed by Commit Bot

[Cronet] Move test assets from android/test to common test.

Bug: 786559
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I5819eab242ec2864d9bdc261868871179e80c8a3
Reviewed-on: https://chromium-review.googlesource.com/906951Reviewed-by: default avatarHelen Li <xunjieli@chromium.org>
Commit-Queue: Misha Efimov <mef@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539889}
parent 926781ee
...@@ -669,7 +669,7 @@ android_library("cronet_javatests") { ...@@ -669,7 +669,7 @@ android_library("cronet_javatests") {
"//third_party/junit", "//third_party/junit",
] ]
data = [ data = [
"test/assets/test/", "//components/cronet/test/data/",
] ]
} }
...@@ -866,6 +866,10 @@ test("cronet_unittests_android") { ...@@ -866,6 +866,10 @@ test("cronet_unittests_android") {
"//testing/gtest", "//testing/gtest",
] ]
data = [
"//components/cronet/test/data/",
]
if (is_android) { if (is_android) {
shard_timeout = 180 shard_timeout = 180
} }
...@@ -1363,10 +1367,10 @@ copy("cronet_package_copy_native_test_lib_unstripped") { ...@@ -1363,10 +1367,10 @@ copy("cronet_package_copy_native_test_lib_unstripped") {
copy("cronet_package_copy_test_assets") { copy("cronet_package_copy_test_assets") {
testonly = true testonly = true
sources = [ sources = [
"test/assets", "//components/cronet/test/data",
] ]
outputs = [ outputs = [
"$_test_package_dir/assets", "$_test_package_dir/assets/test",
] ]
} }
......
...@@ -13,7 +13,7 @@ import org.chromium.base.test.util.UrlUtils; ...@@ -13,7 +13,7 @@ import org.chromium.base.test.util.UrlUtils;
*/ */
public final class TestFilesInstaller { public final class TestFilesInstaller {
// Name of the asset directory in which test files are stored. // Name of the asset directory in which test files are stored.
private static final String TEST_FILE_ASSET_PATH = "components/cronet/android/test/assets/test"; private static final String TEST_FILE_ASSET_PATH = "components/cronet/test/data";
/** /**
* Installs test files if files have not been installed. * Installs test files if files have not been installed.
......
...@@ -4,6 +4,40 @@ ...@@ -4,6 +4,40 @@
import("//testing/test.gni") import("//testing/test.gni")
# This section can be updated from globbing rules using:
# find data -type f | sort | sed 's/\(.*\)/"\1",/g'
bundle_data("test_support_bundle_data") {
visibility = [ ":test_support" ]
testonly = true
sources = [
"data/cacheable.txt",
"data/cacheable.txt.mock-http-headers",
"data/content_length_mismatch.html",
"data/content_length_mismatch.html.mock-http-headers",
"data/gzipped.html",
"data/gzipped.html.mock-http-headers",
"data/multiredirect.html",
"data/multiredirect.html.mock-http-headers",
"data/notfound.html",
"data/notfound.html.mock-http-headers",
"data/quic_data/simple.txt",
"data/redirect.html",
"data/redirect.html.mock-http-headers",
"data/redirect_invalid_scheme.html",
"data/redirect_invalid_scheme.html.mock-http-headers",
"data/secureproxychecksuccess.txt",
"data/secureproxychecksuccess.txt.mock-http-headers",
"data/set_cookie.html",
"data/set_cookie.html.mock-http-headers",
"data/success.txt",
"data/success.txt.mock-http-headers",
]
outputs = [
"{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}",
]
}
# Test support for Cronet common implementation. # Test support for Cronet common implementation.
source_set("test_support") { source_set("test_support") {
testonly = true testonly = true
...@@ -12,8 +46,16 @@ source_set("test_support") { ...@@ -12,8 +46,16 @@ source_set("test_support") {
"//net:test_support", "//net:test_support",
] ]
data = [
"data/",
]
sources = [ sources = [
"test_server.cc", "test_server.cc",
"test_server.h", "test_server.h",
] ]
if (is_ios) {
deps += [ ":test_support_bundle_data" ]
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment