@@ -177,7 +177,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistent) {
177
177
auto engine = builder.LaunchEngine ();
178
178
ASSERT_TRUE (engine.is_valid ());
179
179
180
- // Wait for initial NotifySemanticsEnabled (false).
180
+ // 1: Wait for initial notifySemanticsEnabled (false).
181
181
fml::AutoResetWaitableEvent notify_semantics_enabled_latch;
182
182
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
183
183
Dart_Handle exception = nullptr ;
@@ -188,7 +188,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistent) {
188
188
};
189
189
notify_semantics_enabled_latch.Wait ();
190
190
191
- // Prepare to NotifyAccessibilityFeatures call
191
+ // Prepare notifyAccessibilityFeatures callback.
192
192
fml::AutoResetWaitableEvent notify_features_latch;
193
193
notify_accessibility_features_callback = [&](Dart_NativeArguments args) {
194
194
Dart_Handle exception = nullptr ;
@@ -198,7 +198,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistent) {
198
198
notify_features_latch.Signal ();
199
199
};
200
200
201
- // Enable semantics. Wait for NotifySemanticsEnabled (true).
201
+ // 2: Enable semantics. Wait for notifySemanticsEnabled (true).
202
202
fml::AutoResetWaitableEvent notify_semantics_enabled_latch_2;
203
203
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
204
204
Dart_Handle exception = nullptr ;
@@ -211,10 +211,10 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistent) {
211
211
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
212
212
notify_semantics_enabled_latch_2.Wait ();
213
213
214
- // Wait for initial accessibility features (reduce_motion == false)
214
+ // 3: Wait for notifyAccessibilityFeatures (reduce_motion == false)
215
215
notify_features_latch.Wait ();
216
216
217
- // Set accessibility features: (reduce_motion == true)
217
+ // 4: Wait for notifyAccessibilityFeatures (reduce_motion == true)
218
218
fml::AutoResetWaitableEvent notify_features_latch_2;
219
219
notify_accessibility_features_callback = [&](Dart_NativeArguments args) {
220
220
Dart_Handle exception = nullptr ;
@@ -228,12 +228,12 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistent) {
228
228
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
229
229
notify_features_latch_2.Wait ();
230
230
231
- // Wait for UpdateSemantics callback on platform (current) thread.
231
+ // 5: Wait for UpdateSemantics callback on platform (current) thread.
232
232
signal_native_latch.Wait ();
233
233
fml::MessageLoop::GetCurrent ().RunExpiredTasksNow ();
234
234
semantics_update_latch.Wait ();
235
235
236
- // Dispatch a tap to semantics node 42. Wait for NotifySemanticsAction.
236
+ // 6: Dispatch a tap to semantics node 42. Wait for NotifySemanticsAction.
237
237
fml::AutoResetWaitableEvent notify_semantics_action_latch;
238
238
notify_semantics_action_callback = [&](Dart_NativeArguments args) {
239
239
Dart_Handle exception = nullptr ;
@@ -257,7 +257,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistent) {
257
257
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
258
258
notify_semantics_action_latch.Wait ();
259
259
260
- // Disable semantics. Wait for NotifySemanticsEnabled(false).
260
+ // 7: Disable semantics. Wait for NotifySemanticsEnabled(false).
261
261
fml::AutoResetWaitableEvent notify_semantics_enabled_latch_3;
262
262
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
263
263
Dart_Handle exception = nullptr ;
@@ -353,7 +353,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingUnstableCallbacks) {
353
353
auto engine = builder.LaunchEngine ();
354
354
ASSERT_TRUE (engine.is_valid ());
355
355
356
- // Wait for initial NotifySemanticsEnabled (false).
356
+ // 1: Wait for initial notifySemanticsEnabled (false).
357
357
fml::AutoResetWaitableEvent notify_semantics_enabled_latch;
358
358
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
359
359
Dart_Handle exception = nullptr ;
@@ -364,7 +364,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingUnstableCallbacks) {
364
364
};
365
365
notify_semantics_enabled_latch.Wait ();
366
366
367
- // Prepare to NotifyAccessibilityFeatures call
367
+ // Prepare notifyAccessibilityFeatures callback.
368
368
fml::AutoResetWaitableEvent notify_features_latch;
369
369
notify_accessibility_features_callback = [&](Dart_NativeArguments args) {
370
370
Dart_Handle exception = nullptr ;
@@ -374,7 +374,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingUnstableCallbacks) {
374
374
notify_features_latch.Signal ();
375
375
};
376
376
377
- // Enable semantics. Wait for NotifySemanticsEnabled (true).
377
+ // 2: Enable semantics. Wait for notifySemanticsEnabled (true).
378
378
fml::AutoResetWaitableEvent notify_semantics_enabled_latch_2;
379
379
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
380
380
Dart_Handle exception = nullptr ;
@@ -387,10 +387,10 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingUnstableCallbacks) {
387
387
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
388
388
notify_semantics_enabled_latch_2.Wait ();
389
389
390
- // Wait for initial accessibility features (reduce_motion == false)
390
+ // 3: Wait for notifyAccessibilityFeatures (reduce_motion == false)
391
391
notify_features_latch.Wait ();
392
392
393
- // Set accessibility features: (reduce_motion == true)
393
+ // 4: Wait for notifyAccessibilityFeatures (reduce_motion == true)
394
394
fml::AutoResetWaitableEvent notify_features_latch_2;
395
395
notify_accessibility_features_callback = [&](Dart_NativeArguments args) {
396
396
Dart_Handle exception = nullptr ;
@@ -404,12 +404,12 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingUnstableCallbacks) {
404
404
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
405
405
notify_features_latch_2.Wait ();
406
406
407
- // Wait for UpdateSemantics callback on platform (current) thread.
407
+ // 5: Wait for UpdateSemantics callback on platform (current) thread.
408
408
signal_native_latch.Wait ();
409
409
fml::MessageLoop::GetCurrent ().RunExpiredTasksNow ();
410
410
semantics_update_latch.Wait ();
411
411
412
- // Dispatch a tap to semantics node 42. Wait for NotifySemanticsAction.
412
+ // 6: Dispatch a tap to semantics node 42. Wait for NotifySemanticsAction.
413
413
fml::AutoResetWaitableEvent notify_semantics_action_latch;
414
414
notify_semantics_action_callback = [&](Dart_NativeArguments args) {
415
415
Dart_Handle exception = nullptr ;
@@ -433,7 +433,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingUnstableCallbacks) {
433
433
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
434
434
notify_semantics_action_latch.Wait ();
435
435
436
- // Disable semantics. Wait for NotifySemanticsEnabled(false).
436
+ // 7: Disable semantics. Wait for NotifySemanticsEnabled(false).
437
437
fml::AutoResetWaitableEvent notify_semantics_enabled_latch_3;
438
438
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
439
439
Dart_Handle exception = nullptr ;
@@ -546,7 +546,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
546
546
auto engine = builder.LaunchEngine ();
547
547
ASSERT_TRUE (engine.is_valid ());
548
548
549
- // Wait for initial NotifySemanticsEnabled (false).
549
+ // 1: Wait for initial notifySemanticsEnabled (false).
550
550
fml::AutoResetWaitableEvent notify_semantics_enabled_latch;
551
551
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
552
552
Dart_Handle exception = nullptr ;
@@ -557,7 +557,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
557
557
};
558
558
notify_semantics_enabled_latch.Wait ();
559
559
560
- // Prepare to NotifyAccessibilityFeatures call
560
+ // Prepare notifyAccessibilityFeatures callback.
561
561
fml::AutoResetWaitableEvent notify_features_latch;
562
562
notify_accessibility_features_callback = [&](Dart_NativeArguments args) {
563
563
Dart_Handle exception = nullptr ;
@@ -567,7 +567,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
567
567
notify_features_latch.Signal ();
568
568
};
569
569
570
- // Enable semantics. Wait for NotifySemanticsEnabled (true).
570
+ // 2: Enable semantics. Wait for notifySemanticsEnabled (true).
571
571
fml::AutoResetWaitableEvent notify_semantics_enabled_latch_2;
572
572
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
573
573
Dart_Handle exception = nullptr ;
@@ -580,10 +580,10 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
580
580
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
581
581
notify_semantics_enabled_latch_2.Wait ();
582
582
583
- // Wait for initial accessibility features (reduce_motion == false)
583
+ // 3: Wait for notifyAccessibilityFeatures (reduce_motion == false)
584
584
notify_features_latch.Wait ();
585
585
586
- // Set accessibility features: (reduce_motion == true)
586
+ // 4: Wait for notifyAccessibilityFeatures (reduce_motion == true)
587
587
fml::AutoResetWaitableEvent notify_features_latch_2;
588
588
notify_accessibility_features_callback = [&](Dart_NativeArguments args) {
589
589
Dart_Handle exception = nullptr ;
@@ -597,7 +597,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
597
597
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
598
598
notify_features_latch_2.Wait ();
599
599
600
- // Wait for UpdateSemantics callback on platform (current) thread.
600
+ // 5: Wait for UpdateSemantics callback on platform (current) thread.
601
601
signal_native_latch.Wait ();
602
602
fml::MessageLoop::GetCurrent ().RunExpiredTasksNow ();
603
603
semantics_node_latch.Wait ();
@@ -607,7 +607,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
607
607
ASSERT_EQ (1 , action_count);
608
608
ASSERT_EQ (1 , action_batch_end_count);
609
609
610
- // Dispatch a tap to semantics node 42. Wait for NotifySemanticsAction.
610
+ // 6: Dispatch a tap to semantics node 42. Wait for NotifySemanticsAction.
611
611
fml::AutoResetWaitableEvent notify_semantics_action_latch;
612
612
notify_semantics_action_callback = [&](Dart_NativeArguments args) {
613
613
Dart_Handle exception = nullptr ;
@@ -631,7 +631,7 @@ TEST_F(EmbedderA11yTest, A11yTreeIsConsistentUsingLegacyCallbacks) {
631
631
ASSERT_EQ (result, FlutterEngineResult::kSuccess );
632
632
notify_semantics_action_latch.Wait ();
633
633
634
- // Disable semantics. Wait for NotifySemanticsEnabled(false).
634
+ // 7: Disable semantics. Wait for NotifySemanticsEnabled(false).
635
635
fml::AutoResetWaitableEvent notify_semantics_enabled_latch_3;
636
636
notify_semantics_enabled_callback = [&](Dart_NativeArguments args) {
637
637
Dart_Handle exception = nullptr ;
0 commit comments