Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5caef85

Browse files
authored
Full implementation of text-input-test (#37986)
Implements text-input-test, validates that we're able to receive the correct platform messages through the flutter/keyevent channel
1 parent 80a15a4 commit 5caef85

File tree

11 files changed

+293
-295
lines changed

11 files changed

+293
-295
lines changed

shell/platform/fuchsia/flutter/tests/integration/text-input/BUILD.gn

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ group("tests") {
1515

1616
executable("text-input-test-bin") {
1717
testonly = true
18-
1918
output_name = "text-input-test"
20-
2119
sources = [ "text-input-test.cc" ]
2220

2321
# This is needed for //third_party/googletest for linking zircon symbols.
2422
libs = [ "$fuchsia_sdk_path/arch/$target_cpu/sysroot/lib/libzircon.so" ]
2523

2624
deps = [
27-
"$fuchsia_sdk_root/fidl:fuchsia.feedback",
28-
"$fuchsia_sdk_root/fidl:fuchsia.logger",
29-
"$fuchsia_sdk_root/fidl:fuchsia.sys",
25+
"$fuchsia_sdk_root/fidl:fuchsia.accessibility.semantics",
26+
"$fuchsia_sdk_root/fidl:fuchsia.component",
27+
"$fuchsia_sdk_root/fidl:fuchsia.intl",
28+
"$fuchsia_sdk_root/fidl:fuchsia.kernel",
3029
"$fuchsia_sdk_root/fidl:fuchsia.tracing.provider",
3130
"$fuchsia_sdk_root/fidl:fuchsia.ui.app",
32-
"$fuchsia_sdk_root/fidl:fuchsia.ui.composition",
3331
"$fuchsia_sdk_root/fidl:fuchsia.ui.input",
32+
"$fuchsia_sdk_root/fidl:fuchsia.ui.pointerinjector",
33+
"$fuchsia_sdk_root/fidl:fuchsia.ui.policy",
3434
"$fuchsia_sdk_root/fidl:fuchsia.ui.scenic",
3535
"$fuchsia_sdk_root/fidl:fuchsia.ui.test.input",
3636
"$fuchsia_sdk_root/fidl:fuchsia.ui.test.scene",
@@ -40,9 +40,12 @@ executable("text-input-test-bin") {
4040
"$fuchsia_sdk_root/pkg:scenic_cpp",
4141
"$fuchsia_sdk_root/pkg:sys_component_cpp_testing",
4242
"$fuchsia_sdk_root/pkg:zx",
43+
"text-input-view:package",
44+
"//build/fuchsia/fidl:fuchsia.ui.gfx",
4345
"//flutter/fml",
4446
"//flutter/shell/platform/fuchsia/flutter/tests/integration/utils:check_view",
4547
"//flutter/shell/platform/fuchsia/flutter/tests/integration/utils:color",
48+
"//flutter/shell/platform/fuchsia/flutter/tests/integration/utils:portable_ui_test",
4649
"//flutter/shell/platform/fuchsia/flutter/tests/integration/utils:screenshot",
4750
"//third_party/googletest:gtest",
4851
"//third_party/googletest:gtest_main",
@@ -52,7 +55,6 @@ executable("text-input-test-bin") {
5255
fuchsia_test_archive("text-input-test") {
5356
deps = [
5457
":text-input-test-bin",
55-
"text-input-view:package",
5658

5759
# "OOT" copies of the runners used by tests, to avoid conflicting with the
5860
# runners in the base fuchsia image.
@@ -61,6 +63,5 @@ fuchsia_test_archive("text-input-test") {
6163
]
6264

6365
binary = "$target_name"
64-
6566
cml_file = rebase_path("meta/$target_name.cml")
6667
}

shell/platform/fuchsia/flutter/tests/integration/text-input/meta/text-input-test.cml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
"gtest_runner.shard.cml",
77
"sys/component/realm_builder_absolute.shard.cml",
88

9-
"syslog/client.shard.cml",
10-
"vulkan/client.shard.cml",
11-
129
// This test needs both the vulkan facet and the hermetic-tier-2 facet,
1310
// so we are forced to make it a system test.
1411
"sys/testing/system-test.shard.cml",
@@ -17,6 +14,13 @@
1714
program: {
1815
binary: "bin/app",
1916
},
17+
use: [
18+
{
19+
protocol: [
20+
"fuchsia.ui.test.input.KeyboardInputListener",
21+
]
22+
}
23+
],
2024
offer: [
2125
{
2226
protocol: [
@@ -26,21 +30,43 @@
2630
"fuchsia.scheduler.ProfileProvider",
2731
"fuchsia.sysmem.Allocator",
2832
"fuchsia.tracing.provider.Registry",
33+
"fuchsia.ui.input.ImeService",
2934
"fuchsia.vulkan.loader.Loader",
35+
"fuchsia.ui.scenic.Scenic",
36+
"fuchsia.ui.test.input.KeyboardInputListener",
37+
"fuchsia.ui.input3.Keyboard",
38+
"fuchsia.intl.PropertyProvider",
39+
"fuchsia.posix.socket.Provider",
40+
"fuchsia.ui.pointerinjector.Registry",
41+
"fuchsia.fonts.Provider",
42+
"fuchsia.feedback.CrashReportingProductRegister",
43+
"fuchsia.settings.Keyboard",
44+
"fuchsia.accessibility.semantics.SemanticsManager",
3045
],
3146
from: "parent",
3247
to: "#realm_builder",
3348
},
49+
{
50+
directory: "pkg",
51+
subdir: "config",
52+
as: "config-data",
53+
from: "framework",
54+
to: "#realm_builder",
55+
},
3456
],
3557
// TODO(https://fxbug.dev/114584): Figure out how to bring these in as deps (if possible oot).
3658
facets: {
3759
"fuchsia.test": {
3860
"deprecated-allowed-packages": [
61+
"cursor",
62+
"flatland-scene-manager-test-ui-stack",
63+
"test-ui-stack",
3964
"oot_flutter_aot_runner",
4065
"oot_flutter_jit_runner",
4166
"oot_flutter_jit_product_runner",
4267
"oot_flutter_aot_product_runner",
4368
"test_manager",
69+
"text-input-view",
4470
],
4571
},
4672
},

0 commit comments

Comments
 (0)