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

Unified Diff: ui/wm/core/transient_window_stacking_client_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/wm/core/transient_window_manager_unittest.cc ('k') | ui/wm/core/visibility_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/transient_window_stacking_client_unittest.cc
diff --git a/ui/wm/core/transient_window_stacking_client_unittest.cc b/ui/wm/core/transient_window_stacking_client_unittest.cc
index 6c6e146726bfa1722749d9296c4226bd5332e997..5ee1896e734720e3f1482541ea2e33daa2b28d96 100644
--- a/ui/wm/core/transient_window_stacking_client_unittest.cc
+++ b/ui/wm/core/transient_window_stacking_client_unittest.cc
@@ -4,8 +4,9 @@
#include "ui/wm/core/transient_window_stacking_client.h"
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/test_windows.h"
#include "ui/compositor/test/test_layers.h"
@@ -34,16 +35,16 @@ class TransientWindowStackingClientTest : public aura::test::AuraTestBase {
}
private:
- scoped_ptr<TransientWindowStackingClient> client_;
+ std::unique_ptr<TransientWindowStackingClient> client_;
DISALLOW_COPY_AND_ASSIGN(TransientWindowStackingClientTest);
};
// Tests that transient children are stacked as a unit when using stack above.
TEST_F(TransientWindowStackingClientTest, TransientChildrenGroupAbove) {
- scoped_ptr<Window> parent(CreateTestWindowWithId(0, root_window()));
- scoped_ptr<Window> w1(CreateTestWindowWithId(1, parent.get()));
+ std::unique_ptr<Window> parent(CreateTestWindowWithId(0, root_window()));
+ std::unique_ptr<Window> w1(CreateTestWindowWithId(1, parent.get()));
Window* w11 = CreateTestWindowWithId(11, parent.get());
- scoped_ptr<Window> w2(CreateTestWindowWithId(2, parent.get()));
+ std::unique_ptr<Window> w2(CreateTestWindowWithId(2, parent.get()));
Window* w21 = CreateTestWindowWithId(21, parent.get());
Window* w211 = CreateTestWindowWithId(211, parent.get());
Window* w212 = CreateTestWindowWithId(212, parent.get());
@@ -110,10 +111,10 @@ TEST_F(TransientWindowStackingClientTest, TransientChildrenGroupAbove) {
// Tests that transient children are stacked as a unit when using stack below.
TEST_F(TransientWindowStackingClientTest, TransientChildrenGroupBelow) {
- scoped_ptr<Window> parent(CreateTestWindowWithId(0, root_window()));
- scoped_ptr<Window> w1(CreateTestWindowWithId(1, parent.get()));
+ std::unique_ptr<Window> parent(CreateTestWindowWithId(0, root_window()));
+ std::unique_ptr<Window> w1(CreateTestWindowWithId(1, parent.get()));
Window* w11 = CreateTestWindowWithId(11, parent.get());
- scoped_ptr<Window> w2(CreateTestWindowWithId(2, parent.get()));
+ std::unique_ptr<Window> w2(CreateTestWindowWithId(2, parent.get()));
Window* w21 = CreateTestWindowWithId(21, parent.get());
Window* w211 = CreateTestWindowWithId(211, parent.get());
Window* w212 = CreateTestWindowWithId(212, parent.get());
@@ -180,9 +181,9 @@ TEST_F(TransientWindowStackingClientTest, TransientChildrenGroupBelow) {
// See crbug.com/443433
TEST_F(TransientWindowStackingClientTest,
StackAboveWindowWithNULLLayerDelegate) {
- scoped_ptr<Window> parent(CreateTestWindowWithId(0, root_window()));
- scoped_ptr<Window> w1(CreateTestWindowWithId(1, parent.get()));
- scoped_ptr<Window> w2(CreateTestWindowWithId(2, parent.get()));
+ std::unique_ptr<Window> parent(CreateTestWindowWithId(0, root_window()));
+ std::unique_ptr<Window> w1(CreateTestWindowWithId(1, parent.get()));
+ std::unique_ptr<Window> w2(CreateTestWindowWithId(2, parent.get()));
w2->layer()->set_delegate(NULL);
EXPECT_EQ(w2.get(), parent->children().back());
« no previous file with comments | « ui/wm/core/transient_window_manager_unittest.cc ('k') | ui/wm/core/visibility_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698