mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 14:26:09 +03:00
404 lines
11 KiB
Plaintext
404 lines
11 KiB
Plaintext
|
# Copyright 2017 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("//chrome/common/features.gni")
|
||
|
import("//device/vr/features/features.gni")
|
||
|
import("//testing/test.gni")
|
||
|
import("//tools/grit/repack.gni")
|
||
|
|
||
|
if (is_android) {
|
||
|
import("//build/config/android/rules.gni")
|
||
|
}
|
||
|
|
||
|
assert(enable_vr)
|
||
|
|
||
|
static_library("vr_common") {
|
||
|
sources = [
|
||
|
"animation_player.cc",
|
||
|
"animation_player.h",
|
||
|
"assets.cc",
|
||
|
"assets.h",
|
||
|
"assets_component_update_status.h",
|
||
|
"assets_load_status.h",
|
||
|
"browser_ui_interface.h",
|
||
|
"content_input_delegate.cc",
|
||
|
"content_input_delegate.h",
|
||
|
"controller_mesh.h",
|
||
|
"cpu_surface_provider.cc",
|
||
|
"cpu_surface_provider.h",
|
||
|
"databinding/binding.h",
|
||
|
"databinding/binding_base.h",
|
||
|
"databinding/vector_binding.h",
|
||
|
"databinding/vector_element_binding.h",
|
||
|
"elements/audio_permission_prompt.cc",
|
||
|
"elements/audio_permission_prompt.h",
|
||
|
"elements/audio_permission_prompt_texture.cc",
|
||
|
"elements/audio_permission_prompt_texture.h",
|
||
|
"elements/button.cc",
|
||
|
"elements/button.h",
|
||
|
"elements/content_element.cc",
|
||
|
"elements/content_element.h",
|
||
|
"elements/controller.cc",
|
||
|
"elements/controller.h",
|
||
|
"elements/draw_phase.cc",
|
||
|
"elements/draw_phase.h",
|
||
|
"elements/exclusive_screen_toast_texture.cc",
|
||
|
"elements/exclusive_screen_toast_texture.h",
|
||
|
"elements/exit_prompt.cc",
|
||
|
"elements/exit_prompt.h",
|
||
|
"elements/exit_prompt_texture.cc",
|
||
|
"elements/exit_prompt_texture.h",
|
||
|
"elements/exit_warning_texture.cc",
|
||
|
"elements/exit_warning_texture.h",
|
||
|
"elements/full_screen_rect.cc",
|
||
|
"elements/full_screen_rect.h",
|
||
|
"elements/grid.cc",
|
||
|
"elements/grid.h",
|
||
|
"elements/invisible_hit_target.cc",
|
||
|
"elements/invisible_hit_target.h",
|
||
|
"elements/laser.cc",
|
||
|
"elements/laser.h",
|
||
|
"elements/linear_layout.cc",
|
||
|
"elements/linear_layout.h",
|
||
|
"elements/rect.cc",
|
||
|
"elements/rect.h",
|
||
|
"elements/render_text_wrapper.cc",
|
||
|
"elements/render_text_wrapper.h",
|
||
|
"elements/reticle.cc",
|
||
|
"elements/reticle.h",
|
||
|
"elements/scaled_depth_adjuster.cc",
|
||
|
"elements/scaled_depth_adjuster.h",
|
||
|
"elements/shadow.cc",
|
||
|
"elements/shadow.h",
|
||
|
"elements/simple_textured_element.h",
|
||
|
"elements/spinner.cc",
|
||
|
"elements/spinner.h",
|
||
|
"elements/suggestion.cc",
|
||
|
"elements/suggestion.h",
|
||
|
"elements/system_indicator_texture.cc",
|
||
|
"elements/system_indicator_texture.h",
|
||
|
"elements/text.cc",
|
||
|
"elements/text.h",
|
||
|
"elements/text_input.cc",
|
||
|
"elements/text_input.h",
|
||
|
"elements/textured_element.cc",
|
||
|
"elements/textured_element.h",
|
||
|
"elements/throbber.cc",
|
||
|
"elements/throbber.h",
|
||
|
"elements/transient_element.cc",
|
||
|
"elements/transient_element.h",
|
||
|
"elements/ui_element.cc",
|
||
|
"elements/ui_element.h",
|
||
|
"elements/ui_element_iterator.h",
|
||
|
"elements/ui_element_name.cc",
|
||
|
"elements/ui_element_name.h",
|
||
|
"elements/ui_element_type.cc",
|
||
|
"elements/ui_element_type.h",
|
||
|
"elements/ui_texture.cc",
|
||
|
"elements/ui_texture.h",
|
||
|
"elements/url_bar.cc",
|
||
|
"elements/url_bar.h",
|
||
|
"elements/url_bar_texture.cc",
|
||
|
"elements/url_bar_texture.h",
|
||
|
"elements/vector_icon.cc",
|
||
|
"elements/vector_icon.h",
|
||
|
"elements/viewport_aware_root.cc",
|
||
|
"elements/viewport_aware_root.h",
|
||
|
"elements/webvr_url_toast.cc",
|
||
|
"elements/webvr_url_toast.h",
|
||
|
"elements/webvr_url_toast_texture.cc",
|
||
|
"elements/webvr_url_toast_texture.h",
|
||
|
"exit_vr_prompt_choice.h",
|
||
|
"font_fallback.cc",
|
||
|
"font_fallback.h",
|
||
|
"fps_meter.cc",
|
||
|
"fps_meter.h",
|
||
|
"ganesh_surface_provider.cc",
|
||
|
"ganesh_surface_provider.h",
|
||
|
"gltf_asset.cc",
|
||
|
"gltf_asset.h",
|
||
|
"gltf_parser.cc",
|
||
|
"gltf_parser.h",
|
||
|
"macros.h",
|
||
|
"metrics_helper.cc",
|
||
|
"metrics_helper.h",
|
||
|
"mode.h",
|
||
|
"model/color_scheme.cc",
|
||
|
"model/color_scheme.h",
|
||
|
"model/controller_model.h",
|
||
|
"model/modal_prompt_type.cc",
|
||
|
"model/modal_prompt_type.h",
|
||
|
"model/model.cc",
|
||
|
"model/model.h",
|
||
|
"model/omnibox_suggestions.cc",
|
||
|
"model/omnibox_suggestions.h",
|
||
|
"model/permissions_model.h",
|
||
|
"model/reticle_model.h",
|
||
|
"model/speech_recognition_model.h",
|
||
|
"model/toolbar_state.cc",
|
||
|
"model/toolbar_state.h",
|
||
|
"model/web_vr_timeout_state.h",
|
||
|
"pose_util.cc",
|
||
|
"pose_util.h",
|
||
|
"renderers/base_quad_renderer.cc",
|
||
|
"renderers/base_quad_renderer.h",
|
||
|
"renderers/base_renderer.cc",
|
||
|
"renderers/base_renderer.h",
|
||
|
"renderers/external_textured_quad_renderer.cc",
|
||
|
"renderers/external_textured_quad_renderer.h",
|
||
|
"renderers/gradient_quad_renderer.cc",
|
||
|
"renderers/gradient_quad_renderer.h",
|
||
|
"renderers/textured_quad_renderer.cc",
|
||
|
"renderers/textured_quad_renderer.h",
|
||
|
"renderers/web_vr_renderer.cc",
|
||
|
"renderers/web_vr_renderer.h",
|
||
|
"service/vr_device_manager.cc",
|
||
|
"service/vr_device_manager.h",
|
||
|
"service/vr_display_host.cc",
|
||
|
"service/vr_display_host.h",
|
||
|
"service/vr_service_impl.cc",
|
||
|
"service/vr_service_impl.h",
|
||
|
"speech_recognizer.cc",
|
||
|
"speech_recognizer.h",
|
||
|
"target_property.cc",
|
||
|
"target_property.h",
|
||
|
"toolbar_helper.cc",
|
||
|
"toolbar_helper.h",
|
||
|
"transition.cc",
|
||
|
"transition.h",
|
||
|
"ui.cc",
|
||
|
"ui.h",
|
||
|
"ui_browser_interface.h",
|
||
|
"ui_element_renderer.cc",
|
||
|
"ui_element_renderer.h",
|
||
|
"ui_input_manager.cc",
|
||
|
"ui_input_manager.h",
|
||
|
"ui_renderer.cc",
|
||
|
"ui_renderer.h",
|
||
|
"ui_scene.cc",
|
||
|
"ui_scene.h",
|
||
|
"ui_scene_creator.cc",
|
||
|
"ui_scene_creator.h",
|
||
|
"ui_unsupported_mode.h",
|
||
|
"vr_gl_util.cc",
|
||
|
"vr_gl_util.h",
|
||
|
"web_contents_event_forwarder.cc",
|
||
|
"web_contents_event_forwarder.h",
|
||
|
]
|
||
|
|
||
|
if (enable_gvr_services) {
|
||
|
sources += [ "controller_mesh.cc" ]
|
||
|
|
||
|
public_deps = [
|
||
|
"//chrome/browser/resources:vr_shell_resources",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
deps = [
|
||
|
"//base",
|
||
|
"//cc/animation",
|
||
|
"//cc/paint",
|
||
|
"//chrome/app:generated_resources",
|
||
|
"//chrome/browser/vr/vector_icons",
|
||
|
"//chrome/common:constants",
|
||
|
"//components/omnibox/browser",
|
||
|
"//components/security_state/core",
|
||
|
"//components/strings",
|
||
|
"//components/toolbar",
|
||
|
"//components/url_formatter",
|
||
|
"//components/vector_icons",
|
||
|
"//content/public/browser",
|
||
|
"//content/public/common",
|
||
|
"//device/vr:mojo_bindings",
|
||
|
"//device/vr:vr",
|
||
|
"//net",
|
||
|
"//skia",
|
||
|
"//ui/base",
|
||
|
"//ui/display",
|
||
|
"//ui/gl",
|
||
|
"//ui/gl/init",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
test("vr_common_unittests") {
|
||
|
sources = [
|
||
|
"animation_player_unittest.cc",
|
||
|
"databinding/binding_unittest.cc",
|
||
|
"databinding/vector_binding_unittest.cc",
|
||
|
"elements/button_unittest.cc",
|
||
|
"elements/exit_prompt_unittest.cc",
|
||
|
"elements/linear_layout_unittest.cc",
|
||
|
"elements/rect_unittest.cc",
|
||
|
"elements/scaled_depth_adjuster_unittest.cc",
|
||
|
"elements/shadow_unittest.cc",
|
||
|
"elements/spinner_unittest.cc",
|
||
|
"elements/text_unittest.cc",
|
||
|
"elements/throbber_unittest.cc",
|
||
|
"elements/transient_element_unittest.cc",
|
||
|
"elements/ui_element_iterator_unittest.cc",
|
||
|
"elements/ui_element_unittest.cc",
|
||
|
"elements/url_bar_texture_unittest.cc",
|
||
|
"elements/vector_icon_unittest.cc",
|
||
|
"elements/viewport_aware_root_unittest.cc",
|
||
|
"fps_meter_unittest.cc",
|
||
|
"gltf_parser_unittest.cc",
|
||
|
"pose_util_unittest.cc",
|
||
|
"service/vr_device_manager_unittest.cc",
|
||
|
"speech_recognizer_unittest.cc",
|
||
|
"test/fake_ui_element_renderer.cc",
|
||
|
"test/fake_ui_element_renderer.h",
|
||
|
"test/paths.cc",
|
||
|
"test/paths.h",
|
||
|
"test/run_all_unittests.cc",
|
||
|
"test/ui_test.cc",
|
||
|
"test/ui_test.h",
|
||
|
"ui_input_manager_unittest.cc",
|
||
|
"ui_scene_unittest.cc",
|
||
|
"ui_unittest.cc",
|
||
|
"vr_gl_util_unittest.cc",
|
||
|
]
|
||
|
|
||
|
# TODO(mthiesse, crbug.com/769373): The dependency on device/vr:fakes requires
|
||
|
# some workarounds for tests, since we are static-linking to the fakes instead
|
||
|
# of loading them from a dll on Windows.
|
||
|
defines = [ "DEVICE_VR_IMPLEMENTATION" ]
|
||
|
|
||
|
deps = [
|
||
|
":vr_test_support",
|
||
|
"//mojo/common",
|
||
|
"//mojo/public/cpp/bindings",
|
||
|
"//testing/gmock",
|
||
|
"//ui/gfx/geometry",
|
||
|
]
|
||
|
if (is_android) {
|
||
|
deps += [ "//ui/android:ui_java" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
test("vr_pixeltests") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"test/run_all_pixeltests.cc",
|
||
|
"test/ui_pixel_test.cc",
|
||
|
"test/ui_pixel_test.h",
|
||
|
"ui_pixeltest.cc",
|
||
|
]
|
||
|
|
||
|
deps = [
|
||
|
":vr_gl_test_support",
|
||
|
":vr_test_support",
|
||
|
]
|
||
|
if (is_android) {
|
||
|
deps += [ "//ui/android:ui_java" ]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
test("vr_common_perftests") {
|
||
|
sources = [
|
||
|
"test/run_all_perftests.cc",
|
||
|
"text_perftest.cc",
|
||
|
]
|
||
|
deps = [
|
||
|
":vr_gl_test_support",
|
||
|
":vr_test_support",
|
||
|
"//testing/perf",
|
||
|
]
|
||
|
if (is_android) {
|
||
|
deps += [ "//ui/android:ui_java" ]
|
||
|
}
|
||
|
|
||
|
# Needed for isolate script to execute
|
||
|
data = [
|
||
|
"//testing/scripts/common.py",
|
||
|
"//testing/xvfb.py",
|
||
|
"//testing/scripts/run_gtest_perf_test.py",
|
||
|
"//tools/perf/generate_legacy_perf_dashboard_json.py",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
source_set("vr_test_support") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"test/animation_utils.cc",
|
||
|
"test/animation_utils.h",
|
||
|
"test/constants.h",
|
||
|
"test/mock_browser_ui_interface.cc",
|
||
|
"test/mock_browser_ui_interface.h",
|
||
|
"test/mock_content_input_delegate.cc",
|
||
|
"test/mock_content_input_delegate.h",
|
||
|
"test/mock_ui_browser_interface.cc",
|
||
|
"test/mock_ui_browser_interface.h",
|
||
|
"test/vr_test_suite.cc",
|
||
|
"test/vr_test_suite.h",
|
||
|
]
|
||
|
|
||
|
if (!enable_gvr_services) {
|
||
|
# For testing, we add back controller_mesh.cc on platforms where it isn't
|
||
|
# included by vr_common.
|
||
|
sources += [ "controller_mesh.cc" ]
|
||
|
}
|
||
|
|
||
|
public_deps = [
|
||
|
":vr_common",
|
||
|
":vr_test_pak",
|
||
|
"//base/test:test_support",
|
||
|
"//cc:test_support",
|
||
|
"//components/security_state/core",
|
||
|
"//components/toolbar:vector_icons",
|
||
|
"//content/test:test_support",
|
||
|
"//mojo/edk/system",
|
||
|
"//skia",
|
||
|
"//testing/gtest",
|
||
|
"//ui/accessibility:ax_gen",
|
||
|
"//ui/gfx:test_support",
|
||
|
|
||
|
# TODO(mthiesse, crbug.com/769373): Remove dependency on device/vr:fakes.
|
||
|
"//device/vr:fakes",
|
||
|
|
||
|
# TODO(cjgrant): Figure out why including //ui/android:ui_java here
|
||
|
# doesn't propagate to individual test executable targets.
|
||
|
]
|
||
|
|
||
|
data = [
|
||
|
"test/data/",
|
||
|
"$root_out_dir/vr_test.pak",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
source_set("vr_gl_test_support") {
|
||
|
testonly = true
|
||
|
|
||
|
sources = [
|
||
|
"test/gl_test_environment.cc",
|
||
|
"test/gl_test_environment.h",
|
||
|
"test/gl_test_environment_unittest.cc",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
"//base/test:test_support",
|
||
|
"//skia",
|
||
|
"//ui/gl",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
repack("vr_test_pak") {
|
||
|
sources = [
|
||
|
"$root_gen_dir/chrome/generated_resources_en-US.pak",
|
||
|
"$root_gen_dir/chrome/vr_shell_resources.pak",
|
||
|
"$root_gen_dir/components/components_resources.pak",
|
||
|
"$root_gen_dir/components/strings/components_strings_en-US.pak",
|
||
|
]
|
||
|
|
||
|
output = "$root_out_dir/vr_test.pak"
|
||
|
|
||
|
deps = [
|
||
|
"//chrome/app:generated_resources",
|
||
|
"//chrome/browser/resources:vr_shell_resources",
|
||
|
"//components/resources:components_resources",
|
||
|
"//components/strings",
|
||
|
]
|
||
|
}
|