mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 964421 - Fix APZC gtest to simulate some TabChild behavior. r=kats
This commit is contained in:
parent
c2424a51a2
commit
edc1eaf598
@ -643,8 +643,6 @@ TEST(AsyncPanZoomController, LongPress) {
|
||||
|
||||
EXPECT_TRUE(nullptr != t);
|
||||
EXPECT_CALL(*mcc, HandleLongTap(CSSIntPoint(10, 10), 0, apzc->GetGuid())).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleLongTapUp(CSSIntPoint(10, 10), 0, apzc->GetGuid())).Times(1);
|
||||
EXPECT_CALL(*mcc, SendAsyncScrollDOMEvent(_,_,_)).Times(AtLeast(1));
|
||||
|
||||
// Manually invoke the longpress while the touch is currently down.
|
||||
t->Run();
|
||||
@ -654,6 +652,13 @@ TEST(AsyncPanZoomController, LongPress) {
|
||||
status = ApzcUp(apzc, 10, 10, time);
|
||||
EXPECT_EQ(nsEventStatus_eIgnore, status);
|
||||
|
||||
EXPECT_CALL(*mcc, HandleLongTapUp(CSSIntPoint(10, 10), 0, apzc->GetGuid())).Times(1);
|
||||
|
||||
// To get a LongTapUp event, we must kick APZC to flush its event queue. This
|
||||
// would normally happen if we had a (Tab|RenderFrame)(Parent|Child)
|
||||
// mechanism.
|
||||
apzc->ContentReceivedTouch(false);
|
||||
|
||||
apzc->Destroy();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user