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

Side by Side Diff: ui/events/gestures/fling_curve_unittest.cc

Issue 436213002: athena: Add support for fling-scroll in overview mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/events/gestures/fling_curve.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/gfx/frame_time.h"
9
10 namespace ui {
11
12 TEST(FlingCurveTest, Basic) {
Jun Mukai 2014/08/06 05:31:39 Related to my comment on WindowOverviewMode, it mi
sadrul 2014/08/06 11:53:50 Done.
13 const gfx::Vector2dF velocity(0, 5000);
14 base::TimeTicks now = gfx::FrameTime::Now();
15 FlingCurve curve(velocity, now);
16
17 gfx::Vector2dF scroll =
18 curve.GetScrollAmountAtTime(now + base::TimeDelta::FromMilliseconds(20));
19 EXPECT_EQ(0, scroll.x());
20 EXPECT_NEAR(scroll.y(), 96, 1);
21
22 scroll =
23 curve.GetScrollAmountAtTime(now + base::TimeDelta::FromMilliseconds(250));
24 EXPECT_EQ(0, scroll.x());
25 EXPECT_NEAR(scroll.y(), 705, 1);
26 }
27
28 } // namespace ui
OLDNEW
« athena/wm/window_overview_mode.cc ('K') | « ui/events/gestures/fling_curve.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698