Index: ash/wm/window_modality_controller_unittest.cc |
diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc |
index 71adb6fc2f1ac5c5b61b4560f1b32d91c4e6fd72..57a4bb6c4597773d192de822039d1c8e483d0e3f 100644 |
--- a/ash/wm/window_modality_controller_unittest.cc |
+++ b/ash/wm/window_modality_controller_unittest.cc |
@@ -44,11 +44,11 @@ bool ValidateStacking(aura::Window* parent, int ids[], int count) { |
// - closing a window passes focus up the stack. |
TEST_F(WindowModalityControllerTest, BasicActivation) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1( |
+ std::unique_ptr<aura::Window> w1( |
CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); |
- scoped_ptr<aura::Window> w11( |
+ std::unique_ptr<aura::Window> w11( |
CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect())); |
- scoped_ptr<aura::Window> w12( |
+ std::unique_ptr<aura::Window> w12( |
CreateTestWindowInShellWithDelegate(&d, -12, gfx::Rect())); |
::wm::AddTransientChild(w1.get(), w11.get()); |
@@ -89,13 +89,13 @@ TEST_F(WindowModalityControllerTest, BasicActivation) { |
// - closing a window passes focus up the stack. |
TEST_F(WindowModalityControllerTest, NestedModals) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1( |
+ std::unique_ptr<aura::Window> w1( |
CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); |
- scoped_ptr<aura::Window> w11( |
+ std::unique_ptr<aura::Window> w11( |
CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect())); |
- scoped_ptr<aura::Window> w111( |
+ std::unique_ptr<aura::Window> w111( |
CreateTestWindowInShellWithDelegate(&d, -111, gfx::Rect())); |
- scoped_ptr<aura::Window> w2( |
+ std::unique_ptr<aura::Window> w2( |
CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); |
::wm::AddTransientChild(w1.get(), w11.get()); |
@@ -142,14 +142,14 @@ TEST_F(WindowModalityControllerTest, NestedModals) { |
// - destroying w11 while w111 is focused activates w1. |
TEST_F(WindowModalityControllerTest, NestedModalsOuterClosed) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1( |
+ std::unique_ptr<aura::Window> w1( |
CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); |
- scoped_ptr<aura::Window> w11( |
+ std::unique_ptr<aura::Window> w11( |
CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect())); |
// |w111| will be owned and deleted by |w11|. |
aura::Window* w111 = |
CreateTestWindowInShellWithDelegate(&d, -111, gfx::Rect()); |
- scoped_ptr<aura::Window> w2( |
+ std::unique_ptr<aura::Window> w2( |
CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); |
::wm::AddTransientChild(w1.get(), w11.get()); |
@@ -181,11 +181,11 @@ TEST_F(WindowModalityControllerTest, NestedModalsOuterClosed) { |
// Modality also prevents events from being passed to the transient parent. |
TEST_F(WindowModalityControllerTest, Events) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d, -1, |
- gfx::Rect(0, 0, 100, 100))); |
- scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d, -11, |
- gfx::Rect(20, 20, 50, 50))); |
- scoped_ptr<aura::Window> w111( |
+ std::unique_ptr<aura::Window> w1( |
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect(0, 0, 100, 100))); |
+ std::unique_ptr<aura::Window> w11( |
+ CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect(20, 20, 50, 50))); |
+ std::unique_ptr<aura::Window> w111( |
CreateTestWindowInShellWithDelegate(&d, -111, gfx::Rect(20, 20, 50, 50))); |
::wm::AddTransientChild(w1.get(), w11.get()); |
@@ -216,13 +216,13 @@ TEST_F(WindowModalityControllerTest, Events) { |
// Events on modal parent activate. |
TEST_F(WindowModalityControllerTest, EventsForEclipsedWindows) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d, -1, |
- gfx::Rect(0, 0, 100, 100))); |
- scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d, -11, |
- gfx::Rect(20, 20, 50, 50))); |
+ std::unique_ptr<aura::Window> w1( |
+ CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect(0, 0, 100, 100))); |
+ std::unique_ptr<aura::Window> w11( |
+ CreateTestWindowInShellWithDelegate(&d, -11, gfx::Rect(20, 20, 50, 50))); |
::wm::AddTransientChild(w1.get(), w11.get()); |
- scoped_ptr<aura::Window> w2(CreateTestWindowInShellWithDelegate(&d, -2, |
- gfx::Rect(0, 0, 50, 50))); |
+ std::unique_ptr<aura::Window> w2( |
+ CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect(0, 0, 50, 50))); |
w11->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); |
@@ -242,11 +242,11 @@ TEST_F(WindowModalityControllerTest, EventsForEclipsedWindows) { |
// the parent of w1, and that GetModalTransient(w11) returns w2. |
TEST_F(WindowModalityControllerTest, GetModalTransient) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1( |
+ std::unique_ptr<aura::Window> w1( |
CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); |
- scoped_ptr<aura::Window> w11( |
+ std::unique_ptr<aura::Window> w11( |
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get())); |
- scoped_ptr<aura::Window> w2( |
+ std::unique_ptr<aura::Window> w2( |
CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); |
w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); |
@@ -274,7 +274,7 @@ TEST_F(WindowModalityControllerTest, GetModalTransient) { |
TEST_F(WindowModalityControllerTest, ChangeCapture) { |
views::Widget* widget = views::Widget::CreateWindowWithContext( |
NULL, Shell::GetPrimaryRootWindow()); |
- scoped_ptr<aura::Window> widget_window(widget->GetNativeView()); |
+ std::unique_ptr<aura::Window> widget_window(widget->GetNativeView()); |
views::test::CaptureTrackingView* view = new views::test::CaptureTrackingView; |
widget->client_view()->AddChildView(view); |
widget->SetBounds(gfx::Rect(0, 0, 200, 200)); |
@@ -289,7 +289,7 @@ TEST_F(WindowModalityControllerTest, ChangeCapture) { |
views::Widget* modal_widget = |
views::Widget::CreateWindowWithParent(NULL, widget->GetNativeView()); |
- scoped_ptr<aura::Window> modal_window(modal_widget->GetNativeView()); |
+ std::unique_ptr<aura::Window> modal_window(modal_widget->GetNativeView()); |
modal_window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); |
views::test::CaptureTrackingView* modal_view = |
new views::test::CaptureTrackingView; |
@@ -328,13 +328,13 @@ TEST_F(WindowModalityControllerTest, ReleaseCapture) { |
// w11 |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1( |
+ std::unique_ptr<aura::Window> w1( |
CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); |
- scoped_ptr<aura::Window> w11( |
+ std::unique_ptr<aura::Window> w11( |
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get())); |
- scoped_ptr<aura::Window> w2( |
+ std::unique_ptr<aura::Window> w2( |
CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); |
- scoped_ptr<aura::Window> w3( |
+ std::unique_ptr<aura::Window> w3( |
CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); |
w3->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_CHILD); |
::wm::SetModalParent(w3.get(), w1.get()); |
@@ -409,11 +409,11 @@ class TouchTrackerWindowDelegate : public aura::test::TestWindowDelegate { |
// Modality should prevent events from being passed to the transient parent. |
TEST_F(WindowModalityControllerTest, TouchEvent) { |
TouchTrackerWindowDelegate d1; |
- scoped_ptr<aura::Window> w1(CreateTestWindowInShellWithDelegate(&d1, |
- -1, gfx::Rect(0, 0, 100, 100))); |
+ std::unique_ptr<aura::Window> w1( |
+ CreateTestWindowInShellWithDelegate(&d1, -1, gfx::Rect(0, 0, 100, 100))); |
TouchTrackerWindowDelegate d11; |
- scoped_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate(&d11, |
- -11, gfx::Rect(20, 20, 50, 50))); |
+ std::unique_ptr<aura::Window> w11(CreateTestWindowInShellWithDelegate( |
+ &d11, -11, gfx::Rect(20, 20, 50, 50))); |
ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), |
gfx::Point(10, 10)); |
@@ -597,13 +597,13 @@ TEST_F(WindowModalityControllerTest, ChildModalEventGenerator) { |
// ancestor of the modal parent. |
TEST_F(WindowModalityControllerTest, WindowModalAncestor) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1( |
+ std::unique_ptr<aura::Window> w1( |
CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); |
- scoped_ptr<aura::Window> w2( |
+ std::unique_ptr<aura::Window> w2( |
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get())); |
- scoped_ptr<aura::Window> w3( |
+ std::unique_ptr<aura::Window> w3( |
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w2.get())); |
- scoped_ptr<aura::Window> w4( |
+ std::unique_ptr<aura::Window> w4( |
CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); |
w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW); |
::wm::AddTransientChild(w1.get(), w4.get()); |
@@ -625,13 +625,13 @@ TEST_F(WindowModalityControllerTest, WindowModalAncestor) { |
// ancestor of the modal parent. |
TEST_F(WindowModalityControllerTest, ChildModalAncestor) { |
aura::test::TestWindowDelegate d; |
- scoped_ptr<aura::Window> w1( |
+ std::unique_ptr<aura::Window> w1( |
CreateTestWindowInShellWithDelegate(&d, -1, gfx::Rect())); |
- scoped_ptr<aura::Window> w2( |
+ std::unique_ptr<aura::Window> w2( |
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get())); |
- scoped_ptr<aura::Window> w3( |
+ std::unique_ptr<aura::Window> w3( |
aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w2.get())); |
- scoped_ptr<aura::Window> w4( |
+ std::unique_ptr<aura::Window> w4( |
CreateTestWindowInShellWithDelegate(&d, -2, gfx::Rect())); |
w4->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_CHILD); |
::wm::SetModalParent(w4.get(), w2.get()); |