| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/events/platform/platform_event_builder.h" | 5 #include "ui/events/platform/platform_event_builder.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "ui/events/event.h" | 8 #include "ui/events/event.h" |
| 9 #include "ui/events/keycodes/dom4/keycode_converter.h" | 9 #include "ui/events/keycodes/dom4/keycode_converter.h" |
| 10 #include "ui/events/platform/x11/device_data_manager_x11.h" | 10 #include "ui/events/platform/x11/device_data_manager_x11.h" |
| 11 #include "ui/events/platform/x11/touch_factory_x11.h" | 11 #include "ui/events/platform/x11/touch_factory_x11.h" |
| 12 #include "ui/events/test/events_test_utils_x11.h" | 12 #include "ui/events/test/events_test_utils_x11.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 class PlatformEventBuilderXTest : public testing::Test { | 16 class PlatformEventBuilderXTest : public testing::Test { |
| 17 public: | 17 public: |
| 18 PlatformEventBuilderXTest() {} | 18 PlatformEventBuilderXTest() {} |
| 19 virtual ~PlatformEventBuilderXTest() {} | 19 ~PlatformEventBuilderXTest() override {} |
| 20 | 20 |
| 21 void SetUp() override { | 21 void SetUp() override { |
| 22 DeviceDataManagerX11::CreateInstance(); | 22 DeviceDataManagerX11::CreateInstance(); |
| 23 ui::TouchFactory::GetInstance()->ResetForTest(); | 23 ui::TouchFactory::GetInstance()->ResetForTest(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 DISALLOW_COPY_AND_ASSIGN(PlatformEventBuilderXTest); | 27 DISALLOW_COPY_AND_ASSIGN(PlatformEventBuilderXTest); |
| 28 }; | 28 }; |
| 29 | 29 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 native_event.InitGenericButtonEvent(device_id, ET_MOUSE_PRESSED, origin, | 242 native_event.InitGenericButtonEvent(device_id, ET_MOUSE_PRESSED, origin, |
| 243 EF_LEFT_MOUSE_BUTTON); | 243 EF_LEFT_MOUSE_BUTTON); |
| 244 event = PlatformEventBuilder::BuildMouseEvent(native_event); | 244 event = PlatformEventBuilder::BuildMouseEvent(native_event); |
| 245 event.set_time_stamp(start); | 245 event.set_time_stamp(start); |
| 246 EXPECT_EQ(2, PlatformEventBuilder::GetRepeatCount(native_event, event)); | 246 EXPECT_EQ(2, PlatformEventBuilder::GetRepeatCount(native_event, event)); |
| 247 PlatformEventBuilder::ResetLastClickForTest(); | 247 PlatformEventBuilder::ResetLastClickForTest(); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace ui | 250 } // namespace ui |
| OLD | NEW |