chromium/remoting/host/remote_input_filter_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/host/remote_input_filter.h"

#include <stdint.h>

#include "remoting/proto/event.pb.h"
#include "remoting/protocol/input_event_tracker.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"
#include "ui/events/event.h"

_;
ExpectationSet;
InSequence;

namespace remoting {

InputEventTracker;
MockInputStub;
EqualsKeyEvent;
EqualsTouchEventTypeAndId;

namespace {

static protocol::MouseEvent MouseMoveEvent(int x, int y) {}

static protocol::KeyEvent UsbKeyEvent(int usb_keycode, bool pressed) {}

protocol::TouchEvent TouchStartEvent(uint32_t id) {}

}  // namespace

// Verify that events get through if there is no local activity.
TEST(RemoteInputFilterTest, NoLocalActivity) {}

// Verify that events get through until there is local activity.
TEST(RemoteInputFilterTest, MismatchedLocalActivity) {}

// Verify that touch events are not considered as echoes.
TEST(RemoteInputFilterTest, TouchEventsAreNotCheckedForEcho) {}

// Verify that echos of injected mouse events don't block activity.
TEST(RemoteInputFilterTest, LocalEchoesOfRemoteActivity) {}

// Verify that echos followed by a mismatch blocks activity.
TEST(RemoteInputFilterTest, LocalEchosAndLocalActivity) {}

// Verify that local keyboard input blocks activity.
TEST(RemoteInputFilterTest, LocalKeyPressEventBlocksInput) {}

// Verify that local echoes of remote keyboard activity does not block input
TEST(RemoteInputFilterTest, LocalEchoOfKeyPressEventDoesNotBlockInput) {}

// Verify that local input matching remote keyboard activity that has already
// been discarded as an echo blocks input.
TEST(RemoteInputFilterTest, LocalKeyPressEventMatchingPreviousEchoBlocksInput) {}

// Verify that local input matching remote keyboard activity blocks input if
// local echo is not expected
TEST(RemoteInputFilterTest,
     LocalDuplicateKeyPressEventBlocksInputIfEchoDisabled) {}

// Verify that local activity also causes buttons, keys, and touches to be
// released.
TEST(RemoteInputFilterTest, LocalActivityReleasesAll) {}

}  // namespace remoting