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

Unified Diff: ash/focus_cycler_unittest.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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 | « ash/first_run/first_run_helper_unittest.cc ('k') | ash/frame/caption_buttons/frame_caption_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/focus_cycler_unittest.cc
diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc
index e0b5ea1610c339c58fcb382cf34afcd84cf8f389..e13973ec78dcd9d3db548fc06e2564a79e12cec6 100644
--- a/ash/focus_cycler_unittest.cc
+++ b/ash/focus_cycler_unittest.cc
@@ -4,6 +4,8 @@
#include "ash/focus_cycler.h"
+#include <memory>
+
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_widget.h"
@@ -119,15 +121,15 @@ class FocusCyclerTest : public AshTestBase {
}
private:
- scoped_ptr<FocusCycler> focus_cycler_;
- scoped_ptr<SystemTray> tray_;
+ std::unique_ptr<FocusCycler> focus_cycler_;
+ std::unique_ptr<SystemTray> tray_;
DISALLOW_COPY_AND_ASSIGN(FocusCyclerTest);
};
TEST_F(FocusCyclerTest, CycleFocusBrowserOnly) {
// Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -142,7 +144,7 @@ TEST_F(FocusCyclerTest, CycleFocusForward) {
InstallFocusCycleOnShelf();
// Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -165,7 +167,7 @@ TEST_F(FocusCyclerTest, CycleFocusBackward) {
InstallFocusCycleOnShelf();
// Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -188,7 +190,7 @@ TEST_F(FocusCyclerTest, CycleFocusForwardBackward) {
InstallFocusCycleOnShelf();
// Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -253,8 +255,8 @@ TEST_F(FocusCyclerTest, Shelf_CycleFocusForward) {
shelf_widget()->Hide();
// Create two test windows.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
- scoped_ptr<Window> window1(CreateTestWindowInShellWithId(1));
+ std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ std::unique_ptr<Window> window1(CreateTestWindowInShellWithId(1));
wm::ActivateWindow(window1.get());
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -278,7 +280,7 @@ TEST_F(FocusCyclerTest, Shelf_CycleFocusBackwardInvisible) {
shelf_widget()->Hide();
// Create a single test window.
- scoped_ptr<Window> window0(CreateTestWindowInShellWithId(0));
+ std::unique_ptr<Window> window0(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window0.get());
EXPECT_TRUE(wm::IsActiveWindow(window0.get()));
@@ -296,8 +298,8 @@ TEST_F(FocusCyclerTest, CycleFocusThroughWindowWithPanes) {
InstallFocusCycleOnShelf();
- scoped_ptr<PanedWidgetDelegate> test_widget_delegate;
- scoped_ptr<views::Widget> browser_widget(new views::Widget);
+ std::unique_ptr<PanedWidgetDelegate> test_widget_delegate;
+ std::unique_ptr<views::Widget> browser_widget(new views::Widget);
test_widget_delegate.reset(new PanedWidgetDelegate(browser_widget.get()));
views::Widget::InitParams widget_params(
views::Widget::InitParams::TYPE_WINDOW);
@@ -410,7 +412,7 @@ TEST_F(FocusCyclerTest, RemoveWidgetOnDisplayRemoved) {
UpdateDisplay("800x800");
// Create a single test window.
- scoped_ptr<Window> window(CreateTestWindowInShellWithId(0));
+ std::unique_ptr<Window> window(CreateTestWindowInShellWithId(0));
wm::ActivateWindow(window.get());
EXPECT_TRUE(wm::IsActiveWindow(window.get()));
« no previous file with comments | « ash/first_run/first_run_helper_unittest.cc ('k') | ash/frame/caption_buttons/frame_caption_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698