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

Side by Side Diff: webkit/glue/touch_fling_gesture_curve_unittest.cc

Issue 15937016: Update refernces to Blink's Platform API (webkit) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/touch_fling_gesture_curve.cc ('k') | webkit/glue/web_discardable_memory_impl.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 (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 // Tests for the TouchFlingGestureCurve. 5 // Tests for the TouchFlingGestureCurve.
6 6
7 #include "webkit/glue/touch_fling_gesture_curve.h" 7 #include "webkit/glue/touch_fling_gesture_curve.h"
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h" 11 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatSize.h" 12 #include "third_party/WebKit/public/platform/WebFloatSize.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurve.h" 13 #include "third_party/WebKit/public/platform/WebGestureCurve.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurveTarg et.h" 14 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 15 #include "third_party/WebKit/public/platform/WebSize.h"
16 16
17 using WebKit::WebFloatPoint; 17 using WebKit::WebFloatPoint;
18 using WebKit::WebFloatSize; 18 using WebKit::WebFloatSize;
19 using WebKit::WebGestureCurve; 19 using WebKit::WebGestureCurve;
20 using WebKit::WebGestureCurveTarget; 20 using WebKit::WebGestureCurveTarget;
21 using WebKit::WebSize; 21 using WebKit::WebSize;
22 22
23 namespace { 23 namespace {
24 24
25 class MockGestureCurveTarget : public WebGestureCurveTarget { 25 class MockGestureCurveTarget : public WebGestureCurveTarget {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 EXPECT_EQ(target.current_velocity().height, 0); 62 EXPECT_EQ(target.current_velocity().height, 0);
63 EXPECT_TRUE(curve->apply(0.45f, &target)); // Use non-uniform tick spacing. 63 EXPECT_TRUE(curve->apply(0.45f, &target)); // Use non-uniform tick spacing.
64 EXPECT_TRUE(curve->apply(1, &target)); 64 EXPECT_TRUE(curve->apply(1, &target));
65 EXPECT_FALSE(curve->apply(1.5, &target)); 65 EXPECT_FALSE(curve->apply(1.5, &target));
66 EXPECT_NEAR(target.cumulative_delta().width, 1193, 1); 66 EXPECT_NEAR(target.cumulative_delta().width, 1193, 1);
67 EXPECT_EQ(target.cumulative_delta().height, 0); 67 EXPECT_EQ(target.cumulative_delta().height, 0);
68 EXPECT_EQ(target.current_velocity().width, 0); 68 EXPECT_EQ(target.current_velocity().width, 0);
69 EXPECT_EQ(target.current_velocity().height, 0); 69 EXPECT_EQ(target.current_velocity().height, 0);
70 } 70 }
71 71
OLDNEW
« no previous file with comments | « webkit/glue/touch_fling_gesture_curve.cc ('k') | webkit/glue/web_discardable_memory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698