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

Unified Diff: ui/events/gesture_detection/motion_event_generic_unittest.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: ui/events/gesture_detection/motion_event_generic_unittest.cc
diff --git a/ui/events/gesture_detection/motion_event_generic_unittest.cc b/ui/events/gesture_detection/motion_event_generic_unittest.cc
index 2e0294ffb0e7684f41b26ed7df6d500c87ebfe30..3e2d4e7537e5485b764326ca90427a7bfcec1395 100644
--- a/ui/events/gesture_detection/motion_event_generic_unittest.cc
+++ b/ui/events/gesture_detection/motion_event_generic_unittest.cc
@@ -5,11 +5,13 @@
// MSVC++ requires this to be set before any other includes to get M_PI.
#define _USE_MATH_DEFINES
+#include "ui/events/gesture_detection/motion_event_generic.h"
+
#include <cmath>
+#include <utility>
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/event_constants.h"
-#include "ui/events/gesture_detection/motion_event_generic.h"
#include "ui/events/test/motion_event_test_utils.h"
namespace ui {
@@ -107,7 +109,7 @@ TEST(MotionEventGenericTest, CloneWithHistory) {
scoped_ptr<MotionEvent> historical_event(new MotionEventGeneric(
MotionEvent::ACTION_MOVE, historical_event_time, historical_pointer));
- event.PushHistoricalEvent(historical_event.Pass());
+ event.PushHistoricalEvent(std::move(historical_event));
EXPECT_EQ(1U, event.GetHistorySize());
scoped_ptr<MotionEvent> clone = event.Clone();
@@ -261,8 +263,8 @@ TEST(MotionEventGenericTest, ToString) {
MotionEvent::ACTION_MOVE, historical_event_time1, pointer0));
historical_event1->PushPointer(pointer1);
- event.PushHistoricalEvent(historical_event0.Pass());
- event.PushHistoricalEvent(historical_event1.Pass());
+ event.PushHistoricalEvent(std::move(historical_event0));
+ event.PushHistoricalEvent(std::move(historical_event1));
ASSERT_EQ(2U, event.GetHistorySize());
ASSERT_EQ(2U, event.GetPointerCount());
« no previous file with comments | « ui/events/gesture_detection/motion_event_generic.cc ('k') | ui/events/gestures/blink/web_gesture_curve_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698