コード例 #1
0
PointerEvent* PointerEventFactoryTest::createAndCheckTouchCancel(
    WebPointerProperties::PointerType pointerType, int rawId,
    int uniqueId, bool isPrimary)
{
    PointerEvent* pointerEvent = m_pointerEventFactory.createPointerCancelEvent(
        uniqueId, pointerType);
    EXPECT_EQ(uniqueId, pointerEvent->pointerId());
    EXPECT_EQ(isPrimary, pointerEvent->isPrimary());
    return pointerEvent;
}
コード例 #2
0
PointerEvent* PointerEventFactoryTest::createAndCheckTouchEvent(
    WebPointerProperties::PointerType pointerType,
    int rawId, int uniqueId, bool isPrimary,
    PlatformTouchPoint::TouchState state)
{
    PointerEvent* pointerEvent = m_pointerEventFactory.create(
        EventTypeNames::pointerdown, PointerEventFactoryTest::PlatformTouchPointBuilder(pointerType, rawId, state), PlatformEvent::NoModifiers, FloatSize(), FloatPoint());
    EXPECT_EQ(uniqueId, pointerEvent->pointerId());
    EXPECT_EQ(isPrimary, pointerEvent->isPrimary());
    return pointerEvent;
}
コード例 #3
0
void PointerEventFactoryTest::createAndCheckPointerTransitionEvent(
    PointerEvent* pointerEvent,
    const AtomicString& type)
{
    PointerEvent* clonePointerEvent = m_pointerEventFactory.
        createPointerTransitionEvent(pointerEvent, type, nullptr);
    EXPECT_EQ(clonePointerEvent->pointerType(), pointerEvent->pointerType());
    EXPECT_EQ(clonePointerEvent->pointerId(), pointerEvent->pointerId());
    EXPECT_EQ(clonePointerEvent->isPrimary(), pointerEvent->isPrimary());
    EXPECT_EQ(clonePointerEvent->type(), type);
}
コード例 #4
0
PointerEvent* PointerEventFactoryTest::createAndCheckMouseEvent(
    WebPointerProperties::PointerType pointerType,
    int rawId, int uniqueId, bool isPrimary,
    PlatformEvent::Modifiers modifiers)
{
    PointerEvent* pointerEvent = m_pointerEventFactory.create(
        EventTypeNames::mousedown, PlatformMouseEventBuilder(pointerType, rawId, modifiers), nullptr, nullptr);
    EXPECT_EQ(uniqueId, pointerEvent->pointerId());
    EXPECT_EQ(isPrimary, pointerEvent->isPrimary());
    return pointerEvent;
}