#include "remoting/protocol/input_event_tracker.h"
#include <stdint.h>
#include "remoting/proto/event.pb.h"
#include "remoting/protocol/protocol_mock_objects.h"
#include "remoting/protocol/test_event_matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
_;
ExpectationSet;
InSequence;
namespace remoting::protocol {
EqualsKeyEventWithCapsLock;
EqualsKeyEventWithoutLockStates;
EqualsMouseEvent;
namespace {
static const MouseEvent::MouseButton BUTTON_LEFT = MouseEvent::BUTTON_LEFT;
static const MouseEvent::MouseButton BUTTON_RIGHT = MouseEvent::BUTTON_RIGHT;
MATCHER_P2(TouchPointIdsAndTypeEqual, ids, type, "") { … }
static KeyEvent NewUsbEvent(uint32_t usb_keycode, bool pressed) { … }
static void PressAndReleaseUsb(InputStub* input_stub, uint32_t usb_keycode) { … }
static MouseEvent NewMouseEvent(int x,
int y,
MouseEvent::MouseButton button,
bool down) { … }
void AddTouchPoint(uint32_t id, TouchEvent* event) { … }
}
TEST(InputEventTrackerTest, NothingToRelease) { … }
TEST(InputEventTrackerTest, ReleaseAllKeys) { … }
TEST(InputEventTrackerTest, TrackUsbKeyEvents) { … }
TEST(InputEventTrackerTest, InvalidEventsNotTracked) { … }
TEST(InputEventTrackerTest, ReleaseAllTouchPoints) { … }
TEST(InputEventTrackerTest, ReleaseAllRemainingTouchPoints) { … }
}