chromium/remoting/protocol/test_event_matchers.h

// 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.

#ifndef REMOTING_PROTOCOL_TEST_EVENT_MATCHERS_H_
#define REMOTING_PROTOCOL_TEST_EVENT_MATCHERS_H_

#include <stdint.h>

#include <cmath>

#include "remoting/proto/event.pb.h"
#include "testing/gmock/include/gmock/gmock.h"

// This file contains matchers for protocol events.
namespace remoting::protocol::test {

MATCHER_P2(EqualsKeyEvent, usb_keycode, pressed, "") {}

MATCHER_P2(EqualsKeyEventWithCapsLock, usb_keycode, pressed, "") {}

MATCHER_P2(EqualsKeyEventWithNumLock, usb_keycode, pressed, "") {}

MATCHER_P2(EqualsKeyEventWithoutLockStates, usb_keycode, pressed, "") {}

MATCHER_P(EqualsTextEvent, text, "") {}

MATCHER_P2(EqualsMouseMoveEvent, x, y, "") {}

MATCHER_P2(EqualsMouseButtonEvent, button, button_down, "") {}

MATCHER_P4(EqualsMouseEvent, x, y, button, down, "") {}

MATCHER_P2(EqualsClipboardEvent, mime_type, data, "") {}

MATCHER_P(EqualsTouchEvent, expected_event, "") {}

// If the rounding error for the coordinates checked in TouchPoint* matcher are
// within 1 pixel diff, it is acceptable.
const float kTestTouchErrorEpsilon =;

MATCHER_P(EqualsTouchPointCoordinates, expected_event, "") {}

MATCHER_P(EqualsTouchPointRadii, expected_event, "") {}

MATCHER_P2(EqualsTouchEventTypeAndId, type, id, "") {}

}  // namespace remoting::protocol::test

#endif  // REMOTING_PROTOCOL_TEST_EVENT_MATCHERS_H_