Route app input dispatch through app core

This commit is contained in:
2026-06-05 06:38:48 +02:00
parent 1df93c23f7
commit b825d920d2
11 changed files with 695 additions and 46 deletions

View File

@@ -565,6 +565,16 @@ add_test(NAME pp_app_core_app_frame_tests COMMAND pp_app_core_app_frame_tests)
set_tests_properties(pp_app_core_app_frame_tests PROPERTIES
LABELS "app;desktop-fast;fuzz")
add_executable(pp_app_core_app_input_tests
app_core/app_input_tests.cpp)
target_link_libraries(pp_app_core_app_input_tests PRIVATE
pp_app_core
pp_test_harness)
add_test(NAME pp_app_core_app_input_tests COMMAND pp_app_core_app_input_tests)
set_tests_properties(pp_app_core_app_input_tests PROPERTIES
LABELS "app;desktop-fast;fuzz")
add_executable(pp_app_core_app_shutdown_tests
app_core/app_shutdown_tests.cpp)
target_link_libraries(pp_app_core_app_shutdown_tests PRIVATE
@@ -1002,6 +1012,31 @@ if(TARGET pano_cli)
WILL_FAIL TRUE
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-frame\".*\"message\":\"resize dimensions")
add_test(NAME pano_cli_plan_app_input_pointer_smoke
COMMAND pano_cli plan-app-input --kind pointer --x 100 --y 50 --zoom 2)
set_tests_properties(pano_cli_plan_app_input_pointer_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-input\".*\"kind\":\"pointer\".*\"dispatchDesignerFirst\":true.*\"dispatchMainIfNotConsumed\":true.*\"normalizedX\":50.*\"normalizedY\":25")
add_test(NAME pano_cli_plan_app_input_gesture_smoke
COMMAND pano_cli plan-app-input --kind gesture --x 0 --y 0 --x1 6 --y1 8 --prev-x 0 --prev-y 0 --prev-x1 3 --prev-y1 4 --zoom 2)
set_tests_properties(pano_cli_plan_app_input_gesture_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-input\".*\"kind\":\"gesture\".*\"dispatchMain\":true.*\"normalizedX\":1.5.*\"normalizedY\":2.*\"distance\":10.*\"distanceDelta\":5")
add_test(NAME pano_cli_plan_app_input_key_vr_smoke
COMMAND pano_cli plan-app-input --kind key --spacebar --vr-active)
set_tests_properties(pano_cli_plan_app_input_key_vr_smoke PROPERTIES
LABELS "app;integration;desktop-fast"
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-input\".*\"kind\":\"key\".*\"dispatchMain\":true.*\"setKeyDown\":true.*\"syncVrCameraRotation\":true")
add_test(NAME pano_cli_plan_app_input_rejects_bad_float
COMMAND pano_cli plan-app-input --kind pointer --bad-float)
set_tests_properties(pano_cli_plan_app_input_rejects_bad_float PROPERTIES
LABELS "app;integration;desktop-fast;fuzz"
WILL_FAIL TRUE
PASS_REGULAR_EXPRESSION "\"command\":\"plan-app-input\".*\"message\":\"input zoom must be finite and positive\"")
add_test(NAME pano_cli_plan_app_shutdown_smoke
COMMAND pano_cli plan-app-shutdown)
set_tests_properties(pano_cli_plan_app_shutdown_smoke PROPERTIES