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

Unified Diff: views/focus/focus_manager_unittest.cc

Issue 3046041: [Linux Views] Refactor accelerator handler related code. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Prevent ctrl+alt. Created 10 years, 5 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: views/focus/focus_manager_unittest.cc
diff --git a/views/focus/focus_manager_unittest.cc b/views/focus/focus_manager_unittest.cc
index 955a83a977b734ae2986778e460029691616da04..f786b1d18accf6b582a9246ecefcc2175cc30d12 100644
--- a/views/focus/focus_manager_unittest.cc
+++ b/views/focus/focus_manager_unittest.cc
@@ -1485,6 +1485,10 @@ class MessageTrackingView : public View {
DISALLOW_COPY_AND_ASSIGN(MessageTrackingView);
};
+#if defined(OS_WIN)
+// This test is now Windows only. Linux Views port does not handle accelerator
+// keys in AcceleratorHandler anymore. The logic has been moved into
+// WidgetGtk::OnKeyEvent().
// Tests that the keyup messages are eaten for accelerators.
TEST_F(FocusManagerTest, IgnoreKeyupForAccelerators) {
FocusManager* focus_manager = GetFocusManager();
@@ -1553,15 +1557,12 @@ TEST_F(FocusManagerTest, IgnoreKeyupForAccelerators) {
PostKeyUp(base::VKEY_0);
MessageLoopForUI::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
MessageLoopForUI::current()->Run(&accelerator_handler);
-#if defined(OS_WIN)
- // Linux eats only last accelerator's release event.
- // See http://crbug.com/23383 for details.
EXPECT_TRUE(mtv->keys_pressed().empty());
EXPECT_TRUE(mtv->keys_released().empty());
-#endif
EXPECT_TRUE(mtv->accelerator_pressed());
mtv->Reset();
}
+#endif
#if defined(OS_WIN)
// Test that the focus manager is created successfully for the first view

Powered by Google App Engine
This is Rietveld 408576698