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

Unified Diff: media/base/user_input_monitor_unittest.cc

Issue 2577573002: Removes mouse listeners from UserInputMonitor. (Closed)
Patch Set: Fix win by removing std::move. Created 3 years, 11 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
« no previous file with comments | « media/base/user_input_monitor_mac.cc ('k') | media/base/user_input_monitor_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/user_input_monitor_unittest.cc
diff --git a/media/base/user_input_monitor_unittest.cc b/media/base/user_input_monitor_unittest.cc
index 401d96739079b0e62489092f0e55c43802224e2b..126665bcf94a144323e8b65f70e5d4e010855350 100644
--- a/media/base/user_input_monitor_unittest.cc
+++ b/media/base/user_input_monitor_unittest.cc
@@ -21,36 +21,6 @@
namespace media {
-class MockMouseListener : public UserInputMonitor::MouseEventListener {
- public:
- MOCK_METHOD1(OnMouseMoved, void(const SkIPoint& position));
-
- virtual ~MockMouseListener() {}
-};
-
-#if defined(OS_LINUX) || defined(OS_WIN)
-TEST(UserInputMonitorTest, KeyPressCounter) {
- KeyboardEventCounter counter;
-
- EXPECT_EQ(0u, counter.GetKeyPressCount());
-
- counter.OnKeyboardEvent(ui::ET_KEY_PRESSED, ui::VKEY_0);
- EXPECT_EQ(1u, counter.GetKeyPressCount());
-
- // Holding the same key without releasing it does not increase the count.
- counter.OnKeyboardEvent(ui::ET_KEY_PRESSED, ui::VKEY_0);
- EXPECT_EQ(1u, counter.GetKeyPressCount());
-
- // Releasing the key does not affect the total count.
- counter.OnKeyboardEvent(ui::ET_KEY_RELEASED, ui::VKEY_0);
- EXPECT_EQ(1u, counter.GetKeyPressCount());
-
- counter.OnKeyboardEvent(ui::ET_KEY_PRESSED, ui::VKEY_0);
- counter.OnKeyboardEvent(ui::ET_KEY_RELEASED, ui::VKEY_0);
- EXPECT_EQ(2u, counter.GetKeyPressCount());
-}
-#endif // defined(OS_LINUX) || defined(OS_WIN)
-
TEST(UserInputMonitorTest, CreatePlatformSpecific) {
#if defined(OS_LINUX)
base::MessageLoopForIO message_loop;
@@ -70,11 +40,6 @@ TEST(UserInputMonitorTest, CreatePlatformSpecific) {
// Ignore any callbacks.
EXPECT_CALL(listener, OnMouseMoved(testing::_)).Times(testing::AnyNumber());
-#if !defined(OS_MACOSX)
- monitor->AddMouseListener(&listener);
- monitor->RemoveMouseListener(&listener);
-#endif // !define(OS_MACOSX)
-
monitor->EnableKeyPressMonitoring();
monitor->DisableKeyPressMonitoring();
« no previous file with comments | « media/base/user_input_monitor_mac.cc ('k') | media/base/user_input_monitor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698