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

Unified Diff: ui/events/gesture_detection/motion_event_generic_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 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 3e2d4e7537e5485b764326ca90427a7bfcec1395..d60c528b6247435f9104b43bb3f0aecea12bbe73 100644
--- a/ui/events/gesture_detection/motion_event_generic_unittest.cc
+++ b/ui/events/gesture_detection/motion_event_generic_unittest.cc
@@ -91,7 +91,7 @@ TEST(MotionEventGenericTest, Clone) {
PointerProperties(8.3f, 4.7f, 2.f));
event.set_button_state(MotionEvent::BUTTON_PRIMARY);
- scoped_ptr<MotionEvent> clone = event.Clone();
+ std::unique_ptr<MotionEvent> clone = event.Clone();
ASSERT_TRUE(clone);
EXPECT_EQ(event.GetUniqueEventId(), clone->GetUniqueEventId());
EXPECT_EQ(test::ToString(event), test::ToString(*clone));
@@ -106,13 +106,13 @@ TEST(MotionEventGenericTest, CloneWithHistory) {
MotionEventGeneric event(MotionEvent::ACTION_MOVE, event_time, pointer);
PointerProperties historical_pointer(3.4f, -4.3f, 11.5);
- scoped_ptr<MotionEvent> historical_event(new MotionEventGeneric(
+ std::unique_ptr<MotionEvent> historical_event(new MotionEventGeneric(
MotionEvent::ACTION_MOVE, historical_event_time, historical_pointer));
event.PushHistoricalEvent(std::move(historical_event));
EXPECT_EQ(1U, event.GetHistorySize());
- scoped_ptr<MotionEvent> clone = event.Clone();
+ std::unique_ptr<MotionEvent> clone = event.Clone();
ASSERT_TRUE(clone);
EXPECT_EQ(event.GetUniqueEventId(), clone->GetUniqueEventId());
EXPECT_EQ(test::ToString(event), test::ToString(*clone));
@@ -124,7 +124,7 @@ TEST(MotionEventGenericTest, Cancel) {
PointerProperties(8.7f, 4.3f, 1.f));
event.set_button_state(MotionEvent::BUTTON_SECONDARY);
- scoped_ptr<MotionEvent> cancel = event.Cancel();
+ std::unique_ptr<MotionEvent> cancel = event.Cancel();
event.set_action(MotionEvent::ACTION_CANCEL);
ASSERT_TRUE(cancel);
EXPECT_NE(event.GetUniqueEventId(), cancel->GetUniqueEventId());
@@ -253,13 +253,13 @@ TEST(MotionEventGenericTest, ToString) {
pointer0.x += 50;
pointer1.x -= 50;
- scoped_ptr<MotionEventGeneric> historical_event0(new MotionEventGeneric(
+ std::unique_ptr<MotionEventGeneric> historical_event0(new MotionEventGeneric(
MotionEvent::ACTION_MOVE, historical_event_time0, pointer0));
historical_event0->PushPointer(pointer1);
pointer0.x += 100;
pointer1.x -= 100;
- scoped_ptr<MotionEventGeneric> historical_event1(new MotionEventGeneric(
+ std::unique_ptr<MotionEventGeneric> historical_event1(new MotionEventGeneric(
MotionEvent::ACTION_MOVE, historical_event_time1, pointer0));
historical_event1->PushPointer(pointer1);

Powered by Google App Engine
This is Rietveld 408576698