chromium/third_party/blink/renderer/core/events/pointer_event_factory_test.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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

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 {};

// This test validates that the unique device id provided to blink is reset upon
// a new document being created. Furthermore, it validates that the id is random
// for the same pen but across different documents.
TEST_F(PointerEventFactoryDeviceIdTest, UniqueIdResetAfterClear) {}

// Erasers on the surface hub have a pointer type of
// WebPointerProperties::PointerType::kEraser. Verify that an eraser is treated
// just like a pen event would be.
TEST_F(PointerEventFactoryDeviceIdTest, DeviceIdForMousePointerType) {}

TEST_F(PointerEventFactoryDeviceIdTest, PersistentDeviceIdUseCounterUpdated) {}
}  // namespace blink