| 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 "ui/base/event.h" | |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 #include "ui/base/events/event.h" |
| 7 | 7 |
| 8 #if defined(USE_X11) | 8 #if defined(USE_X11) |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 #include "ui/base/x/x11_util.h" | 10 #include "ui/base/x/x11_util.h" |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 | 14 |
| 15 TEST(EventTest, NoNativeEvent) { | 15 TEST(EventTest, NoNativeEvent) { |
| 16 KeyEvent keyev(ET_KEY_PRESSED, VKEY_SPACE, 0); | 16 KeyEvent keyev(ET_KEY_PRESSED, VKEY_SPACE, 0); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 } | 281 } |
| 282 { | 282 { |
| 283 KeyEvent keyev(ET_KEY_RELEASED, VKEY_MENU, EF_ALT_DOWN); | 283 KeyEvent keyev(ET_KEY_RELEASED, VKEY_MENU, EF_ALT_DOWN); |
| 284 EXPECT_EQ(EF_ALT_DOWN, keyev.flags()); | 284 EXPECT_EQ(EF_ALT_DOWN, keyev.flags()); |
| 285 keyev.NormalizeFlags(); | 285 keyev.NormalizeFlags(); |
| 286 EXPECT_EQ(EF_NONE, keyev.flags()); | 286 EXPECT_EQ(EF_NONE, keyev.flags()); |
| 287 } | 287 } |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace ui | 290 } // namespace ui |
| OLD | NEW |