Bug 964421 - Fix APZC gtest to simulate some TabChild behavior. r=kats

This commit is contained in:
Doug Sherk 2014-02-06 16:34:39 +01:00
parent c2424a51a2
commit edc1eaf598

View File

@ -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();
}