TEST_F(APZCGestureDetectorTester, DoubleTapPreventDefaultBoth) { MakeApzcWaitForMainThread(); MakeApzcZoomable(); EXPECT_CALL(*mcc, HandleSingleTap(CSSPoint(10, 10), 0, apzc->GetGuid())).Times(0); EXPECT_CALL(*mcc, HandleDoubleTap(CSSPoint(10, 10), 0, apzc->GetGuid())).Times(0); uint64_t blockIds[2]; DoubleTapAndCheckStatus(apzc, ScreenIntPoint(10, 10), &blockIds); // responses to the two touchstarts apzc->ContentReceivedInputBlock(blockIds[0], true); apzc->ContentReceivedInputBlock(blockIds[1], true); apzc->AssertStateIsReset(); }
TEST_F(APZCGestureDetectorTester, DoubleTapNotZoomable) { MakeApzcWaitForMainThread(); MakeApzcUnzoomable(); EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1); EXPECT_CALL(*mcc, HandleTap(TapType::eSecondTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1); EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(0); uint64_t blockIds[2]; DoubleTapAndCheckStatus(apzc, ScreenIntPoint(10, 10), &blockIds); // responses to the two touchstarts apzc->ContentReceivedInputBlock(blockIds[0], false); apzc->ContentReceivedInputBlock(blockIds[1], false); apzc->AssertStateIsReset(); }