chromium/remoting/protocol/input_event_tracker_unittest.cc

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

#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) {}

}  // namespace

// Verify that keys that were pressed and released aren't re-released.
TEST(InputEventTrackerTest, NothingToRelease) {}

// Verify that keys that were left pressed get released.
TEST(InputEventTrackerTest, ReleaseAllKeys) {}

// Verify that we track both USB-based key events correctly.
TEST(InputEventTrackerTest, TrackUsbKeyEvents) {}

// Verify that invalid events get passed through but not tracked.
TEST(InputEventTrackerTest, InvalidEventsNotTracked) {}

// All touch points added with multiple touch events should be released as a
// cancel event.
TEST(InputEventTrackerTest, ReleaseAllTouchPoints) {}

// Add some touch points and remove only a subset of them. ReleaseAll() should
// cancel all the remaining touch points.
TEST(InputEventTrackerTest, ReleaseAllRemainingTouchPoints) {}

}  // namespace remoting::protocol