src/ui/a11y/bin/a11y_manager/tests/app_unittest.cc
// Makes sure gesture priorities are right. If they're not, screen reader would intercept this
// gesture.
Makes sure gesture priorities are right. If they're not, screen reader would intercept this
gesture.
Makes sure gesture priorities are right . If they ' re not screen reader would intercept this gesture .
TEST_F(AppUnitTest, MagnifierGestureWithScreenReader) {
  MockMagnificationHandler mag_handler;
  fidl::Binding<fuchsia::accessibility::MagnificationHandler> mag_handler_binding(&mag_handler);
  {
    fuchsia::accessibility::MagnifierPtr magnifier;
    context_provider_.ConnectToPublicService(magnifier.NewRequest());
    magnifier->RegisterHandler(mag_handler_binding.NewBinding());
  }
  fuchsia::settings::AccessibilitySettings settings;
  settings.set_screen_reader(true);
  settings.set_enable_magnification(true);
  mock_setui_.Set(std::move(settings), [](auto) {});
  RunLoopUntilIdle();
  SendPointerEvents(&mock_pointer_event_registry_.listener(), 3 * TapEvents(1, {}));
  RunLoopFor(a11y::Magnifier::kTransitionPeriod);
  EXPECT_GT(mag_handler.transform().scale, 1);
}
TEST_F ( AppUnitTest , MagnifierGestureWithScreenReader ) { MockMagnificationHandler mag_handler ; fidl :: Binding < fuchsia :: accessibility :: MagnificationHandler > mag_handler_binding ( & mag_handler ) ; { fuchsia :: accessibility :: MagnifierPtr magnifier ; context_provider_ . ConnectToPublicService ( magnifier . NewRequest ( ) ) ; magnifier -> RegisterHandler ( mag_handler_binding . NewBinding ( ) ) ; } fuchsia :: settings :: AccessibilitySettings settings ; settings . set_screen_reader ( true ) ; settings . set_enable_magnification ( true ) ; mock_setui_ . Set ( std :: move ( settings ) , [ ] ( auto ) { } ) ; RunLoopUntilIdle ( ) ; SendPointerEvents ( & mock_pointer_event_registry_ . listener ( ) , 3 * TapEvents ( 1 , { } ) ) ; RunLoopFor ( a11y :: Magnifier :: kTransitionPeriod ) ; EXPECT_GT ( mag_handler . transform ( ) . scale , 1 ) ; }
Makes sure gesture priorities are right.
Makes sure gesture priorities are right .