16 auto message_latch = std::make_shared<fml::AutoResetWaitableEvent>();
26 ASSERT_EQ(nodes.size(), (
size_t)1);
27 auto node = nodes.find(0)->second;
29 ASSERT_EQ(node.label,
"label");
30 ASSERT_EQ(node.labelAttributes.size(), (
size_t)1);
31 ASSERT_EQ(node.labelAttributes[0]->start, 1);
32 ASSERT_EQ(node.labelAttributes[0]->end, 2);
35 ASSERT_EQ(node.value,
"value");
36 ASSERT_EQ(node.valueAttributes.size(), (
size_t)1);
37 ASSERT_EQ(node.valueAttributes[0]->start, 2);
38 ASSERT_EQ(node.valueAttributes[0]->end, 3);
41 ASSERT_EQ(node.hint,
"hint");
42 ASSERT_EQ(node.hintAttributes.size(), (
size_t)1);
43 ASSERT_EQ(node.hintAttributes[0]->start, 0);
44 ASSERT_EQ(node.hintAttributes[0]->end, 1);
46 auto local_attribute =
47 std::static_pointer_cast<LocaleStringAttribute>(node.hintAttributes[0]);
48 ASSERT_EQ(local_attribute->locale,
"en-MX");
50 ASSERT_EQ(node.increasedValue,
"increasedValue");
51 ASSERT_EQ(node.increasedValueAttributes.size(), (
size_t)1);
52 ASSERT_EQ(node.increasedValueAttributes[0]->start, 4);
53 ASSERT_EQ(node.increasedValueAttributes[0]->end, 5);
54 ASSERT_EQ(node.increasedValueAttributes[0]->type,
57 ASSERT_EQ(node.decreasedValue,
"decreasedValue");
58 ASSERT_EQ(node.decreasedValueAttributes.size(), (
size_t)1);
59 ASSERT_EQ(node.decreasedValueAttributes[0]->start, 5);
60 ASSERT_EQ(node.decreasedValueAttributes[0]->end, 6);
61 ASSERT_EQ(node.decreasedValueAttributes[0]->type,
63 message_latch->Signal();
66 Settings settings = CreateSettingsForFixture();
68 GetCurrentTaskRunner(),
74 AddNativeCallback(
"SemanticsUpdate",
77 std::unique_ptr<Shell> shell = CreateShell(settings, task_runners);
79 ASSERT_TRUE(shell->IsSetup());
81 configuration.SetEntrypoint(
"sendSemanticsUpdate");
83 shell->RunEngine(std::move(configuration), [](
auto result) {
87 message_latch->Wait();
88 DestroyShell(std::move(shell), task_runners);
static RunConfiguration InferFromSettings(const Settings &settings, const fml::RefPtr< fml::TaskRunner > &io_worker=nullptr, IsolateLaunchType launch_type=IsolateLaunchType::kNewGroup)
Attempts to infer a run configuration from the settings object. This tries to create a run configurat...