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/XKBlib.h> | 9 #include <X11/XKBlib.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 return (ui_key_event.flags() & ui::EF_FUNCTION_KEY); | 78 return (ui_key_event.flags() & ui::EF_FUNCTION_KEY); |
79 } | 79 } |
80 return true; | 80 return true; |
81 } | 81 } |
82 | 82 |
83 } // namespace | 83 } // namespace |
84 | 84 |
85 class PlatformEventUtilsXTest : public testing::Test { | 85 class PlatformEventUtilsXTest : public testing::Test { |
86 public: | 86 public: |
87 PlatformEventUtilsXTest() {} | 87 PlatformEventUtilsXTest() {} |
88 virtual ~PlatformEventUtilsXTest() {} | 88 ~PlatformEventUtilsXTest() override {} |
89 | 89 |
90 virtual void SetUp() override { | 90 void SetUp() override { |
91 DeviceDataManagerX11::CreateInstance(); | 91 DeviceDataManagerX11::CreateInstance(); |
92 ui::TouchFactory::GetInstance()->ResetForTest(); | 92 ui::TouchFactory::GetInstance()->ResetForTest(); |
93 } | 93 } |
94 | 94 |
95 private: | 95 private: |
96 DISALLOW_COPY_AND_ASSIGN(PlatformEventUtilsXTest); | 96 DISALLOW_COPY_AND_ASSIGN(PlatformEventUtilsXTest); |
97 }; | 97 }; |
98 | 98 |
99 TEST_F(PlatformEventUtilsXTest, ButtonEvents) { | 99 TEST_F(PlatformEventUtilsXTest, ButtonEvents) { |
100 XEvent event; | 100 XEvent event; |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 KeyEventTestApi test_event(&key_event); | 620 KeyEventTestApi test_event(&key_event); |
621 test_event.set_is_char(true); | 621 test_event.set_is_char(true); |
622 } | 622 } |
623 EXPECT_FALSE(key_event.flags() & ui::EF_IME_FABRICATED_KEY); | 623 EXPECT_FALSE(key_event.flags() & ui::EF_IME_FABRICATED_KEY); |
624 } | 624 } |
625 } | 625 } |
626 } | 626 } |
627 #endif | 627 #endif |
628 | 628 |
629 } // namespace ui | 629 } // namespace ui |
OLD | NEW |