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

Side by Side Diff: ui/events/gesture_detection/velocity_tracker_unittest.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "base/time/time.h" 10 #include "base/time/time.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 #include "ui/events/gesture_detection/velocity_tracker_state.h" 12 #include "ui/events/gesture_detection/velocity_tracker_state.h"
12 #include "ui/events/test/motion_event_test_utils.h" 13 #include "ui/events/test/motion_event_test_utils.h"
13 #include "ui/gfx/geometry/point_f.h" 14 #include "ui/gfx/geometry/point_f.h"
14 #include "ui/gfx/geometry/vector2d_f.h" 15 #include "ui/gfx/geometry/vector2d_f.h"
15 16
16 using base::TimeDelta; 17 using base::TimeDelta;
17 using base::TimeTicks; 18 using base::TimeTicks;
18 using ui::test::MockMotionEvent; 19 using ui::test::MockMotionEvent;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 255
255 // This does not hold for the unrestricted LSQ2 strategy. 256 // This does not hold for the unrestricted LSQ2 strategy.
256 state_unrestricted.ComputeCurrentVelocity(1000, 20000); 257 state_unrestricted.ComputeCurrentVelocity(1000, 20000);
257 EXPECT_EQ(0, state_unrestricted.GetXVelocity(0)); 258 EXPECT_EQ(0, state_unrestricted.GetXVelocity(0));
258 // Y velocity is negative, despite the fact that the finger only moved in the 259 // Y velocity is negative, despite the fact that the finger only moved in the
259 // positive y direction. 260 // positive y direction.
260 EXPECT_GT(0, state_unrestricted.GetYVelocity(0)); 261 EXPECT_GT(0, state_unrestricted.GetYVelocity(0));
261 } 262 }
262 263
263 } // namespace ui 264 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/velocity_tracker.h ('k') | ui/events/gestures/blink/web_gesture_curve_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698