summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 07:37:30 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-18 07:37:30 +0000
commit257b2c5198a848075c7f62f2619c027e76873b2d (patch)
treee43535e8f306297b6bd94b9a5886a4c88e579629 /remoting/client
parenteb00a767eb1a343202cacd57e0c74bac2fb8c44b (diff)
downloadchromium_src-257b2c5198a848075c7f62f2619c027e76873b2d.zip
chromium_src-257b2c5198a848075c7f62f2619c027e76873b2d.tar.gz
chromium_src-257b2c5198a848075c7f62f2619c027e76873b2d.tar.bz2
Fix some style nits in the MouseInputFilter unit-tests.
BUG=93552 Review URL: http://codereview.chromium.org/9251006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/mouse_input_filter_unittest.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/remoting/client/mouse_input_filter_unittest.cc b/remoting/client/mouse_input_filter_unittest.cc
index f48ee1f..8be19bc 100644
--- a/remoting/client/mouse_input_filter_unittest.cc
+++ b/remoting/client/mouse_input_filter_unittest.cc
@@ -1,8 +1,9 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "remoting/client/mouse_input_filter.h"
+
#include "remoting/proto/event.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,24 +28,24 @@ class MockInputStub : public protocol::InputStub {
DISALLOW_COPY_AND_ASSIGN(MockInputStub);
};
-static protocol::MouseEvent mouseMoveEvent(int x, int y) {
+static protocol::MouseEvent MouseMoveEvent(int x, int y) {
protocol::MouseEvent event;
event.set_x(x);
event.set_y(y);
return event;
}
-static void injectTestSequence(protocol::InputStub* input_stub) {
+static void InjectTestSequence(protocol::InputStub* input_stub) {
static const SkIPoint input_sequence[] = {
{-5, 10}, {0, 10}, {-1, 10}, {15, 40}, {15, 45}, {15, 39}, {15, 25}
};
for (unsigned int i=0; i<arraysize(input_sequence); ++i) {
const SkIPoint& point = input_sequence[i];
- input_stub->InjectMouseEvent(mouseMoveEvent(point.x(), point.y()));
+ input_stub->InjectMouseEvent(MouseMoveEvent(point.x(), point.y()));
}
for (unsigned int i=0; i<arraysize(input_sequence); ++i) {
const SkIPoint& point = input_sequence[i];
- input_stub->InjectMouseEvent(mouseMoveEvent(point.y(), point.x()));
+ input_stub->InjectMouseEvent(MouseMoveEvent(point.y(), point.x()));
}
}
@@ -56,7 +57,7 @@ TEST(MouseInputFilterTest, BothDimensionsZero) {
EXPECT_CALL(mock_stub, InjectMouseEvent(_))
.Times(0);
- injectTestSequence(&mouse_filter);
+ InjectTestSequence(&mouse_filter);
}
// Verify that no events get through if there's no input size.
@@ -68,7 +69,7 @@ TEST(MouseInputFilterTest, InputDimensionsZero) {
EXPECT_CALL(mock_stub, InjectMouseEvent(_))
.Times(0);
- injectTestSequence(&mouse_filter);
+ InjectTestSequence(&mouse_filter);
}
// Verify that no events get through if there's no output size.
@@ -80,7 +81,7 @@ TEST(MouseInputFilterTest, OutputDimensionsZero) {
EXPECT_CALL(mock_stub, InjectMouseEvent(_))
.Times(0);
- injectTestSequence(&mouse_filter);
+ InjectTestSequence(&mouse_filter);
}
// Verify that all events get through, clamped to the output.
@@ -108,7 +109,7 @@ TEST(MouseInputFilterTest, NoScalingOrClipping) {
Times(1);
}
- injectTestSequence(&mouse_filter);
+ InjectTestSequence(&mouse_filter);
}
// Verify that we can up-scale with clamping.
@@ -136,7 +137,7 @@ TEST(MouseInputFilterTest, UpScalingAndClamping) {
Times(1);
}
- injectTestSequence(&mouse_filter);
+ InjectTestSequence(&mouse_filter);
}
// Verify that we can down-scale with clamping.
@@ -165,7 +166,7 @@ TEST(MouseInputFilterTest, DownScalingAndClamping) {
}
- injectTestSequence(&mouse_filter);
+ InjectTestSequence(&mouse_filter);
}
} // namespace remoting