#include "third_party/blink/renderer/core/events/pointer_event_factory.h"
#include <gtest/gtest.h>
#include <limits>
#include "base/containers/contains.h"
#include "base/test/scoped_feature_list.h"
#include "third_party/blink/public/common/input/web_pointer_properties.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/script/classic_script.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
namespace {
const int32_t kBrowserDeviceId0 = …;
const int32_t kBrowserDeviceId1 = …;
}
namespace blink {
class PointerEventFactoryTest : public testing::Test { … };
void PointerEventFactoryTest::SetUp() { … }
PointerEvent* PointerEventFactoryTest::CreateAndCheckPointerCancel(
WebPointerProperties::PointerType pointer_type,
int raw_id,
int unique_id,
bool is_primary) { … }
void PointerEventFactoryTest::CreateAndCheckPointerTransitionEvent(
PointerEvent* pointer_event,
const AtomicString& type) { … }
void PointerEventFactoryTest::CheckNonHoveringPointers(
const HashSet<int>& expected_pointers) { … }
TEST_F(PointerEventFactoryTest, MousePointer) { … }
TEST_F(PointerEventFactoryTest, TouchPointerPrimaryRemovedWhileAnotherIsThere) { … }
TEST_F(PointerEventFactoryTest, TouchPointerReleasedAndPressedAgain) { … }
TEST_F(PointerEventFactoryTest, TouchAndDrag) { … }
TEST_F(PointerEventFactoryTest, MouseAndTouchAndPen) { … }
TEST_F(PointerEventFactoryTest, NonHoveringPointers) { … }
TEST_F(PointerEventFactoryTest, PenAsTouchAndMouseEvent) { … }
TEST_F(PointerEventFactoryTest, OutOfRange) { … }
TEST_F(PointerEventFactoryTest, LastPointerPosition) { … }
TEST_F(PointerEventFactoryTest, CoalescedEvents) { … }
TEST_F(PointerEventFactoryTest, PredictedEvents) { … }
TEST_F(PointerEventFactoryTest, MousePointerKeyStates) { … }
class PointerEventFactoryDeviceIdTest : public SimTest { … };
TEST_F(PointerEventFactoryDeviceIdTest, UniqueIdResetAfterClear) { … }
TEST_F(PointerEventFactoryDeviceIdTest, DeviceIdForMousePointerType) { … }
TEST_F(PointerEventFactoryDeviceIdTest, PersistentDeviceIdUseCounterUpdated) { … }
}