Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: remoting/protocol/input_event_tracker_unittest.cc

Issue 9465035: Move ClientSession's input logic into separate components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move filtering based on local input to RemoteInputFilter. Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/input_event_tracker_unittest.cc
diff --git a/remoting/protocol/key_event_tracker_unittest.cc b/remoting/protocol/input_event_tracker_unittest.cc
similarity index 88%
rename from remoting/protocol/key_event_tracker_unittest.cc
rename to remoting/protocol/input_event_tracker_unittest.cc
index 358057d6630e83a2c2f63e46806cd353830bec01..60fa3b8d4b13d170dceea31bb089b8a85377d4aa 100644
--- a/remoting/protocol/key_event_tracker_unittest.cc
+++ b/remoting/protocol/input_event_tracker_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "remoting/protocol/key_event_tracker.h"
+#include "remoting/protocol/input_event_tracker.h"
#include "remoting/proto/event.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -41,9 +41,9 @@ static void PressAndRelease(protocol::InputStub* input_stub, int keycode) {
}
// Verify that keys that were pressed and released aren't re-released.
-TEST(KeyEventTrackerTest, NothingToRelease) {
+TEST(InputEventTrackerTest, NothingToRelease) {
MockInputStub mock_stub;
- protocol::KeyEventTracker key_tracker(&mock_stub);
+ protocol::InputEventTracker key_tracker(&mock_stub);
{
InSequence s;
@@ -54,12 +54,13 @@ TEST(KeyEventTrackerTest, NothingToRelease) {
}
PressAndRelease(&key_tracker, 1);
PressAndRelease(&key_tracker, 2);
+ key_tracker.ReleaseAll();
}
// Verify that keys that were left pressed get released.
-TEST(KeyEventTrackerTest, ReleaseAllKeys) {
+TEST(InputEventTrackerTest, ReleaseAllKeys) {
MockInputStub mock_stub;
- protocol::KeyEventTracker key_tracker(&mock_stub);
+ protocol::InputEventTracker key_tracker(&mock_stub);
ExpectationSet injects;
{
@@ -78,7 +79,7 @@ TEST(KeyEventTrackerTest, ReleaseAllKeys) {
key_tracker.InjectKeyEvent(KeyEvent(3, true));
PressAndRelease(&key_tracker, 1);
PressAndRelease(&key_tracker, 2);
- key_tracker.ReleaseAllKeys();
+ key_tracker.ReleaseAll();
}
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698