OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/workspace/workspace_window_resizer.h" | 5 #include "ash/wm/workspace/workspace_window_resizer.h" |
6 | 6 |
7 #include "ash/ash_constants.h" | 7 #include "ash/ash_constants.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
113 // RootWindow and Display can't resize on Windows Ash. | 113 // RootWindow and Display can't resize on Windows Ash. |
114 // http://crbug.com/165962 | 114 // http://crbug.com/165962 |
115 EXPECT_EQ(kRootHeight, root_bounds.height()); | 115 EXPECT_EQ(kRootHeight, root_bounds.height()); |
116 #endif | 116 #endif |
117 EXPECT_EQ(800, root_bounds.width()); | 117 EXPECT_EQ(800, root_bounds.width()); |
118 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); | 118 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
119 window_.reset(new aura::Window(&delegate_)); | 119 window_.reset(new aura::Window(&delegate_)); |
120 window_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 120 window_->SetType(aura::client::WINDOW_TYPE_NORMAL); |
121 window_->Init(ui::LAYER_NOT_DRAWN); | 121 window_->Init(ui::LAYER_NOT_DRAWN); |
122 SetDefaultParentByPrimaryRootWindow(window_.get()); | 122 ParentWindowInPrimaryRootWindow(window_.get()); |
123 window_->set_id(1); | 123 window_->set_id(1); |
124 | 124 |
125 window2_.reset(new aura::Window(&delegate2_)); | 125 window2_.reset(new aura::Window(&delegate2_)); |
126 window2_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 126 window2_->SetType(aura::client::WINDOW_TYPE_NORMAL); |
127 window2_->Init(ui::LAYER_NOT_DRAWN); | 127 window2_->Init(ui::LAYER_NOT_DRAWN); |
128 SetDefaultParentByPrimaryRootWindow(window2_.get()); | 128 ParentWindowInPrimaryRootWindow(window2_.get()); |
129 window2_->set_id(2); | 129 window2_->set_id(2); |
130 | 130 |
131 window3_.reset(new aura::Window(&delegate3_)); | 131 window3_.reset(new aura::Window(&delegate3_)); |
132 window3_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 132 window3_->SetType(aura::client::WINDOW_TYPE_NORMAL); |
133 window3_->Init(ui::LAYER_NOT_DRAWN); | 133 window3_->Init(ui::LAYER_NOT_DRAWN); |
134 SetDefaultParentByPrimaryRootWindow(window3_.get()); | 134 ParentWindowInPrimaryRootWindow(window3_.get()); |
135 window3_->set_id(3); | 135 window3_->set_id(3); |
136 | 136 |
137 window4_.reset(new aura::Window(&delegate4_)); | 137 window4_.reset(new aura::Window(&delegate4_)); |
138 window4_->SetType(aura::client::WINDOW_TYPE_NORMAL); | 138 window4_->SetType(aura::client::WINDOW_TYPE_NORMAL); |
139 window4_->Init(ui::LAYER_NOT_DRAWN); | 139 window4_->Init(ui::LAYER_NOT_DRAWN); |
140 SetDefaultParentByPrimaryRootWindow(window4_.get()); | 140 ParentWindowInPrimaryRootWindow(window4_.get()); |
141 window4_->set_id(4); | 141 window4_->set_id(4); |
142 } | 142 } |
143 | 143 |
144 virtual void TearDown() OVERRIDE { | 144 virtual void TearDown() OVERRIDE { |
145 window_.reset(); | 145 window_.reset(); |
146 window2_.reset(); | 146 window2_.reset(); |
147 window3_.reset(); | 147 window3_.reset(); |
148 window4_.reset(); | 148 window4_.reset(); |
149 touch_resize_window_.reset(); | 149 touch_resize_window_.reset(); |
150 AshTestBase::TearDown(); | 150 AshTestBase::TearDown(); |
(...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1954 RunAnimationTillComplete(phantom_controller->animation_.get()); | 1954 RunAnimationTillComplete(phantom_controller->animation_.get()); |
1955 | 1955 |
1956 // Hide phantom controller. Both widgets should close. | 1956 // Hide phantom controller. Both widgets should close. |
1957 phantom_controller->Hide(); | 1957 phantom_controller->Hide(); |
1958 EXPECT_FALSE(phantom_controller->phantom_widget_); | 1958 EXPECT_FALSE(phantom_controller->phantom_widget_); |
1959 EXPECT_FALSE(phantom_controller->phantom_widget_start_); | 1959 EXPECT_FALSE(phantom_controller->phantom_widget_start_); |
1960 } | 1960 } |
1961 | 1961 |
1962 } // namespace internal | 1962 } // namespace internal |
1963 } // namespace ash | 1963 } // namespace ash |
OLD | NEW |