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

Unified Diff: media/base/user_input_monitor_unittest.cc

Issue 2577573002: Removes mouse listeners from UserInputMonitor. (Closed)
Patch Set: Addresses Wez's #17,18 comments. 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
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..c8ec9b9cc49fcd7c161d7fff014acdfaaec06efa 100644
--- a/media/base/user_input_monitor_unittest.cc
+++ b/media/base/user_input_monitor_unittest.cc
@@ -28,29 +28,6 @@ class MockMouseListener : public UserInputMonitor::MouseEventListener {
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;

Powered by Google App Engine
This is Rietveld 408576698