| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <cstring> | 5 #include <cstring> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 #include <X11/Xutil.h> | 10 #include <X11/Xutil.h> |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 if (is_char) { | 486 if (is_char) { |
| 487 KeyEventTestApi test_event(&key_event); | 487 KeyEventTestApi test_event(&key_event); |
| 488 test_event.set_is_char(true); | 488 test_event.set_is_char(true); |
| 489 } | 489 } |
| 490 EXPECT_FALSE(key_event.flags() & ui::EF_IME_FABRICATED_KEY); | 490 EXPECT_FALSE(key_event.flags() & ui::EF_IME_FABRICATED_KEY); |
| 491 } | 491 } |
| 492 } | 492 } |
| 493 } | 493 } |
| 494 #endif | 494 #endif |
| 495 | 495 |
| 496 TEST_F(EventsXTest, IgnoresMotionEventForMouseWheelScroll) { |
| 497 int device_id = 1; |
| 498 std::vector<int> devices; |
| 499 devices.push_back(device_id); |
| 500 ui::SetUpPointerDevicesForTest(devices); |
| 501 |
| 502 ScopedXI2Event xev; |
| 503 xev.InitScrollEvent(device_id, 1, 2, 3, 4, 1); |
| 504 // We shouldn't produce a mouse move event on a mouse wheel |
| 505 // scroll. These events are only produced for some mice. |
| 506 EXPECT_EQ(ui::ET_UNKNOWN, ui::EventTypeFromNative(xev)); |
| 507 } |
| 508 |
| 496 } // namespace ui | 509 } // namespace ui |
| OLD | NEW |