@@ -1272,6 +1272,27 @@ TEST_F(GestureConverterTest, Tap) {
12721272 WithDisplayId (ui::LogicalDisplayId::DEFAULT)))));
12731273}
12741274
1275+ TEST_F (GestureConverterTest, ThreeFingerTap_TriggersShortcut) {
1276+ InputDeviceContext deviceContext (*mDevice , EVENTHUB_ID);
1277+ GestureConverter converter (*mReader ->getContext (), deviceContext, DEVICE_ID);
1278+ converter.setDisplayId (ui::LogicalDisplayId::DEFAULT);
1279+ converter.setThreeFingerTapShortcutEnabled (true );
1280+
1281+ Gesture flingGesture (kGestureFling , ARBITRARY_GESTURE_TIME, ARBITRARY_GESTURE_TIME, /* vx=*/ 0 ,
1282+ /* vy=*/ 0 , GESTURES_FLING_TAP_DOWN);
1283+ std::list<NotifyArgs> args =
1284+ converter.handleGesture (ARBITRARY_TIME, READ_TIME, ARBITRARY_TIME, flingGesture);
1285+ // We don't need to check args here, since it's covered by the FlingTapDown test.
1286+
1287+ Gesture tapGesture (kGestureButtonsChange , ARBITRARY_GESTURE_TIME, ARBITRARY_GESTURE_TIME,
1288+ /* down=*/ GESTURES_BUTTON_MIDDLE, /* up=*/ GESTURES_BUTTON_MIDDLE,
1289+ /* is_tap=*/ true );
1290+ args = converter.handleGesture (ARBITRARY_TIME, READ_TIME, ARBITRARY_TIME, tapGesture);
1291+
1292+ ASSERT_TRUE (args.empty ());
1293+ mFakePolicy ->assertTouchpadThreeFingerTapNotified ();
1294+ }
1295+
12751296TEST_F (GestureConverterTest, Click) {
12761297 // Click should produce button press/release events
12771298 InputDeviceContext deviceContext (*mDevice , EVENTHUB_ID);
0 commit comments