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

Unified Diff: remoting/host/linux/mock_x11_keyboard.h

Issue 2346643003: [Remoting Host] Handle text event characters that are not presented on the keyboard (Closed)
Patch Set: Merge ToT Created 4 years, 3 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/host/linux/mock_x11_keyboard.h
diff --git a/remoting/host/linux/mock_x11_keyboard.h b/remoting/host/linux/mock_x11_keyboard.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a4797e6c14edba4a8ecf6315adce6a921d29ecc
--- /dev/null
+++ b/remoting/host/linux/mock_x11_keyboard.h
@@ -0,0 +1,33 @@
+// Copyright 2016 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.
+
+#ifndef REMOTING_HOST_LINUX_MOCK_X11_KEYBOARD_H_
+#define REMOTING_HOST_LINUX_MOCK_X11_KEYBOARD_H_
+
+#include <remoting/host/linux/x11_keyboard.h>
+#include "base/macros.h"
+
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace remoting {
+
+class MockX11Keyboard : public X11Keyboard {
Sergey Ulanov 2016/09/23 18:51:26 In this case I think the tests would be significan
Sergey Ulanov 2016/09/23 18:51:26 Put this class in x11_key_mapper_unittest.cc . It'
Yuwei 2016/09/26 17:57:19 Done.
Yuwei 2016/09/26 17:57:19 Done.
+ public:
+ MockX11Keyboard();
+ ~MockX11Keyboard() override;
+
+ MOCK_METHOD0(GetUnusedKeycodes, std::vector<uint32_t>());
+ MOCK_METHOD2(PressKey, void(uint32_t, uint32_t));
Sergey Ulanov 2016/09/23 18:51:27 add parameter names for all parameters
Yuwei 2016/09/26 17:57:19 Obsolete.
+ MOCK_METHOD3(FindKeycode, bool(uint32_t, uint32_t*, uint32_t*));
+ MOCK_METHOD2(ChangeKeyMapping, bool(uint32_t, uint32_t));
+
+ void Flush() override;
Sergey Ulanov 2016/09/23 18:51:26 If this is a Mock class, then it's best to mock al
Yuwei 2016/09/26 17:57:19 Obsolete.
+ void Sync() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockX11Keyboard);
+};
+
+} // namespace remoting
+#endif // REMOTING_HOST_LINUX_MOCK_X11_KEYBOARD_H_

Powered by Google App Engine
This is Rietveld 408576698