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

Unified Diff: ui/views/controls/native/native_view_host_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/views/controls/native/native_view_host_unittest.cc
diff --git a/ui/views/controls/native/native_view_host_unittest.cc b/ui/views/controls/native/native_view_host_unittest.cc
index c15295942ff990b948fad726e1bde498fba96d9c..0baba8257c3f5c16abb2e6a8341045ce2db4496b 100644
--- a/ui/views/controls/native/native_view_host_unittest.cc
+++ b/ui/views/controls/native/native_view_host_unittest.cc
@@ -4,8 +4,9 @@
#include "ui/views/controls/native/native_view_host.h"
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "ui/aura/window.h"
#include "ui/views/controls/native/native_view_host_test_base.h"
#include "ui/views/test/views_test_base.h"
@@ -98,10 +99,8 @@ TEST_F(NativeViewHostTest, NativeViewHierarchyChanged) {
NativeViewHierarchyChangedTestView* test_view =
new NativeViewHierarchyChangedTestView;
NativeViewHost* host = new NativeViewHost;
- scoped_ptr<Widget> child(CreateChildForHost(toplevel()->GetNativeView(),
- toplevel()->GetRootView(),
- test_view,
- host));
+ std::unique_ptr<Widget> child(CreateChildForHost(
+ toplevel()->GetNativeView(), toplevel()->GetRootView(), test_view, host));
#if defined(USE_AURA)
// Two notifications are generated from inserting the native view into the
// clipping window and then inserting the clipping window into the root
@@ -159,20 +158,14 @@ TEST_F(NativeViewHostTest, ViewHierarchyChangedForHost) {
// Add two children widgets attached to a NativeViewHost, and a test
// grandchild as child widget of host0.
NativeViewHost* host0 = new NativeViewHost;
- scoped_ptr<Widget> child0(CreateChildForHost(toplevel()->GetNativeView(),
- toplevel()->GetRootView(),
- new View,
- host0));
+ std::unique_ptr<Widget> child0(CreateChildForHost(
+ toplevel()->GetNativeView(), toplevel()->GetRootView(), new View, host0));
NativeViewHost* host1 = new NativeViewHost;
- scoped_ptr<Widget> child1(CreateChildForHost(toplevel()->GetNativeView(),
- toplevel()->GetRootView(),
- new View,
- host1));
+ std::unique_ptr<Widget> child1(CreateChildForHost(
+ toplevel()->GetNativeView(), toplevel()->GetRootView(), new View, host1));
ViewHierarchyChangedTestHost* test_host = new ViewHierarchyChangedTestHost;
- scoped_ptr<Widget> test_child(CreateChildForHost(host0->native_view(),
- host0,
- new View,
- test_host));
+ std::unique_ptr<Widget> test_child(
+ CreateChildForHost(host0->native_view(), host0, new View, test_host));
// Remove test_host from host0, expect 1 parent change.
test_host->ResetParentChanges();
@@ -224,15 +217,11 @@ TEST_F(NativeViewHostTest, ViewHierarchyChangedForHostParent) {
// To each child view, add a child widget.
ViewHierarchyChangedTestHost* host0 = new ViewHierarchyChangedTestHost;
- scoped_ptr<Widget> child0(CreateChildForHost(toplevel()->GetNativeView(),
- view0,
- new View,
- host0));
+ std::unique_ptr<Widget> child0(
+ CreateChildForHost(toplevel()->GetNativeView(), view0, new View, host0));
ViewHierarchyChangedTestHost* host1 = new ViewHierarchyChangedTestHost;
- scoped_ptr<Widget> child1(CreateChildForHost(toplevel()->GetNativeView(),
- view1,
- new View,
- host1));
+ std::unique_ptr<Widget> child1(
+ CreateChildForHost(toplevel()->GetNativeView(), view1, new View, host1));
// Remove view0 from top level, expect 1 parent change.
host0->ResetParentChanges();
« no previous file with comments | « ui/views/controls/native/native_view_host_test_base.h ('k') | ui/views/controls/prefix_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698