Bug 1029631 - Make a couple of gtests touch-action-friendly. r=botond

MozReview-Commit-ID: 8zCUkjtj3qt
This commit is contained in:
Kartikaya Gupta 2016-07-11 13:45:39 -04:00
Родитель 6eaee4fec1
Коммит 05015521b4
2 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -299,7 +299,11 @@ TEST_F(APZCBasicTester, OverScroll_Bug1152051b) {
// to schedule a new one since we're still overscrolled. We don't pan because
// panning can trigger functions that clear the overscroll animation state
// in other ways.
TouchDown(apzc, ScreenIntPoint(10, 10), mcc->Time(), nullptr);
uint64_t blockId;
nsEventStatus status = TouchDown(apzc, ScreenIntPoint(10, 10), mcc->Time(), &blockId);
if (gfxPrefs::TouchActionEnabled() && status != nsEventStatus_eConsumeNoDefault) {
SetDefaultAllowedTouchBehavior(apzc, blockId);
}
TouchUp(apzc, ScreenIntPoint(10, 10), mcc->Time());
// Sample the second overscroll animation to its end.

Просмотреть файл

@ -604,7 +604,10 @@ TEST_F(APZCGestureDetectorTester, LongPressInterruptedByWheel) {
uint64_t touchBlockId = 0;
uint64_t wheelBlockId = 0;
TouchDown(apzc, ScreenIntPoint(10, 10), mcc->Time(), &touchBlockId);
nsEventStatus status = TouchDown(apzc, ScreenIntPoint(10, 10), mcc->Time(), &touchBlockId);
if (gfxPrefs::TouchActionEnabled() && status != nsEventStatus_eConsumeNoDefault) {
SetDefaultAllowedTouchBehavior(apzc, touchBlockId);
}
mcc->AdvanceByMillis(10);
Wheel(apzc, ScreenIntPoint(10, 10), ScreenPoint(0, -10), mcc->Time(), &wheelBlockId);
EXPECT_NE(touchBlockId, wheelBlockId);