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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 EXPECT_EQ("600,0 500x500", | 140 EXPECT_EQ("600,0 500x500", |
141 fullscreen->GetWindowBoundsInScreen().ToString()); | 141 fullscreen->GetWindowBoundsInScreen().ToString()); |
142 EXPECT_EQ("0,0 500x500", | 142 EXPECT_EQ("0,0 500x500", |
143 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString()); | 143 fullscreen->GetNativeView()->GetBoundsInRootWindow().ToString()); |
144 #endif | 144 #endif |
145 | 145 |
146 // Make sure a window that will delete itself when losing focus | 146 // Make sure a window that will delete itself when losing focus |
147 // will not crash. | 147 // will not crash. |
148 aura::WindowTracker tracker; | 148 aura::WindowTracker tracker; |
149 DeleteOnBlurDelegate delete_on_blur_delegate; | 149 DeleteOnBlurDelegate delete_on_blur_delegate; |
150 aura::Window* d2 = aura::test::CreateTestWindowWithDelegate( | 150 aura::Window* d2 = CreateTestWindowInShellWithDelegate( |
151 &delete_on_blur_delegate, 0, gfx::Rect(50, 50, 100, 100), NULL); | 151 &delete_on_blur_delegate, 0, gfx::Rect(50, 50, 100, 100)); |
152 delete_on_blur_delegate.set_window(d2); | 152 delete_on_blur_delegate.set_window(d2); |
153 root_windows[0]->GetFocusManager()->SetFocusedWindow( | 153 root_windows[0]->GetFocusManager()->SetFocusedWindow( |
154 d2, NULL); | 154 d2, NULL); |
155 tracker.Add(d2); | 155 tracker.Add(d2); |
156 | 156 |
157 UpdateDisplay("600x600"); | 157 UpdateDisplay("600x600"); |
158 | 158 |
159 // d2 must have been deleted. | 159 // d2 must have been deleted. |
160 EXPECT_FALSE(tracker.Contains(d2)); | 160 EXPECT_FALSE(tracker.Contains(d2)); |
161 | 161 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 views::Widget* session_modal_widget = | 309 views::Widget* session_modal_widget = |
310 CreateModalWidget(gfx::Rect(300, 10, 100, 100)); | 310 CreateModalWidget(gfx::Rect(300, 10, 100, 100)); |
311 EXPECT_EQ(Shell::GetContainer(controller->root_window(), | 311 EXPECT_EQ(Shell::GetContainer(controller->root_window(), |
312 internal::kShellWindowId_SystemModalContainer)->layout_manager(), | 312 internal::kShellWindowId_SystemModalContainer)->layout_manager(), |
313 controller->GetSystemModalLayoutManager( | 313 controller->GetSystemModalLayoutManager( |
314 session_modal_widget->GetNativeView())); | 314 session_modal_widget->GetNativeView())); |
315 } | 315 } |
316 | 316 |
317 } // namespace test | 317 } // namespace test |
318 } // namespace ash | 318 } // namespace ash |
OLD | NEW |