#include "ui/events/velocity_tracker/motion_event_buffer.h"
#include <stddef.h>
#include "base/numerics/safe_conversions.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/test/motion_event_test_utils.h"
TimeTicks;
MockMotionEvent;
namespace ui {
const int kSmallDeltaMs = …;
const int kLargeDeltaMs = …;
const int kResampleDeltaMs = …;
const float kVelocityEpsilon = …;
const float kDeltaEpsilon = …;
#define EXPECT_EVENT_EQ(A, B) …
#define EXPECT_EVENT_IGNORING_HISTORY_EQ(A, B) …
#define EXPECT_EVENT_HISTORY_EQ(A, I, B) …
class MotionEventBufferTest : public testing::Test,
public MotionEventBufferClient { … };
TEST_F(MotionEventBufferTest, BufferEmpty) { … }
TEST_F(MotionEventBufferTest, BufferWithOneMoveNotResampled) { … }
TEST_F(MotionEventBufferTest, BufferFlushedOnNonActionMove) { … }
TEST_F(MotionEventBufferTest, BufferFlushedOnIncompatibleActionMove) { … }
TEST_F(MotionEventBufferTest, OnlyActionMoveBuffered) { … }
TEST_F(MotionEventBufferTest, OutOfOrderPointersBuffered) { … }
TEST_F(MotionEventBufferTest, FlushedEventsNeverLaterThanFlushTime) { … }
TEST_F(MotionEventBufferTest, NoResamplingWhenDisabled) { … }
TEST_F(MotionEventBufferTest, NoResamplingWithOutOfOrderActionMove) { … }
TEST_F(MotionEventBufferTest, NoResamplingWithSmallTimeDeltaBetweenMoves) { … }
TEST_F(MotionEventBufferTest, NoResamplingWithMismatchBetweenMoves) { … }
TEST_F(MotionEventBufferTest, Interpolation) { … }
TEST_F(MotionEventBufferTest, Extrapolation) { … }
TEST_F(MotionEventBufferTest, ExtrapolationHorizonLimited) { … }
TEST_F(MotionEventBufferTest, Resampling30to60) { … }
TEST_F(MotionEventBufferTest, Resampling60to60) { … }
TEST_F(MotionEventBufferTest, Resampling100to60) { … }
TEST_F(MotionEventBufferTest, Resampling120to60) { … }
TEST_F(MotionEventBufferTest, Resampling150to60) { … }
}