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

Unified Diff: ui/events/x/events_x_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
« no previous file with comments | « ui/events/test/test_event_target.cc ('k') | ui/gfx/animation/animation_container_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/events_x_unittest.cc
diff --git a/ui/events/x/events_x_unittest.cc b/ui/events/x/events_x_unittest.cc
index 42f38a30e5b2b43affa5d102502f2054d8047caa..65e4a03ac1ae03df7330eb606b1769490eb9c233 100644
--- a/ui/events/x/events_x_unittest.cc
+++ b/ui/events/x/events_x_unittest.cc
@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <stddef.h>
-#include <stdint.h>
#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/XInput2.h>
+#include <stddef.h>
+#include <stdint.h>
#include <cstring>
+#include <memory>
#include <set>
#include <utility>
@@ -18,7 +19,6 @@
#undef None
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/devices/x11/device_data_manager_x11.h"
@@ -327,7 +327,7 @@ TEST_F(EventsXTest, TouchEventNotRemovingFromNativeMapping) {
ui::ScopedXI2Event xpress0;
xpress0.InitTouchEvent(
0, XI_TouchBegin, kTrackingId, gfx::Point(10, 10), valuators);
- scoped_ptr<ui::TouchEvent> upress0(new ui::TouchEvent(xpress0));
+ std::unique_ptr<ui::TouchEvent> upress0(new ui::TouchEvent(xpress0));
EXPECT_EQ(0, GetTouchIdForTrackingId(kTrackingId));
ui::ScopedXI2Event xpress1;
@@ -389,7 +389,8 @@ TEST_F(EventsXTest, DisableKeyboard) {
int master_device_id = 3;
device_data_manager->DisableDevice(blocked_device_id);
- scoped_ptr<std::set<KeyboardCode> > excepted_keys(new std::set<KeyboardCode>);
+ std::unique_ptr<std::set<KeyboardCode>> excepted_keys(
+ new std::set<KeyboardCode>);
excepted_keys->insert(VKEY_B);
device_data_manager->SetDisabledKeyboardAllowedKeys(std::move(excepted_keys));
« no previous file with comments | « ui/events/test/test_event_target.cc ('k') | ui/gfx/animation/animation_container_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698