Commit 0e1a1b3a authored by sdefresne's avatar sdefresne Committed by Commit bot

[iOS] Define bundle_data target for //ui unittests

This ensure that the files required by ui_base_unittests and
gfx_unittests application will be copied into the application
bundles on iOS.

BUG=297668

Review URL: https://codereview.chromium.org/1806033002

Cr-Commit-Position: refs/heads/master@{#381682}
parent ec01f17f
......@@ -702,6 +702,16 @@ if (is_android) {
}
}
bundle_data("ui_base_unittests_bundle_data") {
sources = [
"test/data/data_pack_unittest/truncated-header.pak",
]
outputs = [
"{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}",
]
}
# GYP version: ui/base/ui_base_tests.gyp:ui_base_unittests
test("ui_base_unittests") {
sources = [
......@@ -799,6 +809,7 @@ test("ui_base_unittests") {
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":ui_base_unittests_bundle_data",
"//base",
"//base/test:test_support",
"//net",
......@@ -818,14 +829,14 @@ test("ui_base_unittests") {
"//url",
]
if (is_ios) {
# TODO(GYP) lots of iOS-only steps for ui_base_unittests
}
if (build_ime) {
deps += [ "//ui/base/ime" ]
}
if (is_ios) {
deps += [ "//ui/resources:ui_test_pak_bundle_data" ]
}
if (is_win) {
sources += [
"dragdrop/os_exchange_data_win_unittest.cc",
......
......@@ -636,6 +636,16 @@ source_set("test_support") {
}
}
bundle_data("gfx_unittests_bundle_data") {
sources = [
"test/data",
]
outputs = [
"{{bundle_resources_dir}}/" +
"{{source_root_relative_dir}}/{{source_file_part}}",
]
}
test("gfx_unittests") {
sources = [
"font_render_params_linux_unittest.cc",
......@@ -719,6 +729,7 @@ test("gfx_unittests") {
deps = [
":gfx",
":gfx_unittests_bundle_data",
":test_support",
"//base",
"//base/test:test_support",
......
......@@ -71,6 +71,21 @@ if (is_ios || is_mac) {
":repack_ui_test_pak",
]
}
# This needs to be a separate target from ui_test_pak as ui_base_unittests
# wants the generate .pak file in the bundle to be named en.lpro/locale.pak
# while components_unittests wants it to be named ui_test.pak.
bundle_data("ui_test_pak_bundle_data") {
public_deps = [
":ui_test_pak",
]
sources = [
"$root_out_dir/ui_test.pak",
]
outputs = [
"{{bundle_resources_dir}}/en.lproj/locale.pak",
]
}
} else {
copy("ui_test_pak") {
sources = [
......
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