chromium/remoting/client/input/touch_input_scaler_unittest.cc

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

#include "remoting/client/input/touch_input_scaler.h"

#include <stdint.h>

#include <cmath>

#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"

_;
AllOf;
PrintToString;

namespace remoting {

MockInputStub;
TouchEvent;
TouchEventPoint;
EqualsTouchPointCoordinates;
EqualsTouchPointRadii;

namespace {

const float kDefaultRadius =;
const float kDefaultXCoord =;
const float kDefaultYCoord =;

struct PointInfo {};

const PointInfo kDefaultPointInfo =;

}  // namespace

class TouchInputScalerTest : public ::testing::Test {};

// TouchInputFilter require both input and output dimensions.
// These test verify that no events are forwarded to the next InputStub if
// either dimensions are not set or 0.
TEST_F(TouchInputScalerTest, NoDimensionsSet) {}

TEST_F(TouchInputScalerTest, BothDimensionsZero) {}

TEST_F(TouchInputScalerTest, SetOnlyInputDimensions) {}

TEST_F(TouchInputScalerTest, SetOnlyOutputDimensions) {}

// The x,y coordinate fall in the desktop size.
TEST_F(TouchInputScalerTest, NoClampingNoScaling) {}

// Make sure clamping works.
TEST_F(TouchInputScalerTest, ClampingNoScaling) {}

TEST_F(TouchInputScalerTest, ClampingMultiplePointsNoScaling) {}

// Verify up-scaling works. All coordinates should fall inside the output
// dimensions after scaling.
TEST_F(TouchInputScalerTest, UpScalingNoClamping) {}

// Verify up-scaling works with clamping.
TEST_F(TouchInputScalerTest, UpScalingWithClamping) {}

// Verify down scaling works. All coordinates should fall inside the output
// dimensions after scaling.
TEST_F(TouchInputScalerTest, DownScalingNoClamping) {}

// Verify down scaling works with clamping.
TEST_F(TouchInputScalerTest, DownScalingWithClamping) {}

// Verify that the radii are up-scaled.
TEST_F(TouchInputScalerTest, UpScaleRadii) {}

// Verify that the radii are down-scaled.
TEST_F(TouchInputScalerTest, DownScaleRadii) {}

// Verify that up-scaling with clamping works for x,y coordinates and radii all
// work together.
TEST_F(TouchInputScalerTest, UpScaleCoordinatesAndRadii) {}

// Verify that down-scaling with clamping works for x,y coordinates and radii
// all work together.
TEST_F(TouchInputScalerTest, DownScaleCoordinatesAndRadii) {}

}  // namespace remoting