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

Side by Side Diff: ui/events/blink/blink_event_util_unittest.cc

Issue 2497033002: Break apart WebGestureEvent from WebInputEvent. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | ui/events/blink/input_handler_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/blink/blink_event_util.h" 5 #include "ui/events/blink/blink_event_util.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/WebKit/public/platform/WebGestureEvent.h"
9 #include "third_party/WebKit/public/platform/WebInputEvent.h" 10 #include "third_party/WebKit/public/platform/WebInputEvent.h"
10 #include "ui/events/gesture_event_details.h" 11 #include "ui/events/gesture_event_details.h"
11 12
12 namespace ui { 13 namespace ui {
13 14
14 using BlinkEventUtilTest = testing::Test; 15 using BlinkEventUtilTest = testing::Test;
15 16
16 TEST(BlinkEventUtilTest, NoScalingWith1DSF) { 17 TEST(BlinkEventUtilTest, NoScalingWith1DSF) {
17 ui::GestureEventDetails details(ui::ET_GESTURE_SCROLL_UPDATE, 1, 1); 18 ui::GestureEventDetails details(ui::ET_GESTURE_SCROLL_UPDATE, 1, 1);
18 details.set_device_type(ui::GestureDeviceType::DEVICE_TOUCHSCREEN); 19 details.set_device_type(ui::GestureDeviceType::DEVICE_TOUCHSCREEN);
19 auto event = 20 auto event =
20 CreateWebGestureEvent(details, 21 CreateWebGestureEvent(details,
21 base::TimeTicks(), 22 base::TimeTicks(),
22 gfx::PointF(1.f, 1.f), 23 gfx::PointF(1.f, 1.f),
23 gfx::PointF(1.f, 1.f), 24 gfx::PointF(1.f, 1.f),
24 0, 25 0,
25 0U); 26 0U);
26 EXPECT_FALSE(ScaleWebInputEvent(event, 1.f)); 27 EXPECT_FALSE(ScaleWebInputEvent(event, 1.f));
27 EXPECT_TRUE(ScaleWebInputEvent(event, 2.f)); 28 EXPECT_TRUE(ScaleWebInputEvent(event, 2.f));
28 } 29 }
29 30
30 } // namespace ui 31 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | ui/events/blink/input_handler_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698