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

Unified Diff: ui/events/blink/blink_event_util_unittest.cc

Issue 1609193002: [UseZoomForDSF] Alwatys use DIP coordinates in pepper plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | ui/events/events_unittests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/blink_event_util_unittest.cc
diff --git a/ui/events/blink/blink_event_util_unittest.cc b/ui/events/blink/blink_event_util_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cb0830caabe918412f64879b4b5c1bccd883d1e1
--- /dev/null
+++ b/ui/events/blink/blink_event_util_unittest.cc
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/events/blink/blink_event_util.h"
+
+#include "base/time/time.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "ui/events/gesture_event_details.h"
+
+namespace ui {
+
+using BlinkEventUtilTest = testing::Test;
+
+TEST(BlinkEventUtilTest, NoScalingWith1DSF) {
+ const ui::GestureEventDetails details(ui::ET_GESTURE_SCROLL_UPDATE,
+ 1,
+ 1);
+ auto event =
+ CreateWebGestureEvent(details,
+ base::TimeDelta::FromMilliseconds(1),
+ gfx::PointF(1.f, 1.f),
+ gfx::PointF(1.f, 1.f),
+ 0);
+ EXPECT_FALSE(ScaleWebInputEvent(event, 1.f));
+ EXPECT_TRUE(ScaleWebInputEvent(event, 2.f));
+}
+
+} // namespace ui
« no previous file with comments | « ui/events/blink/blink_event_util.cc ('k') | ui/events/events_unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698