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/system_modal_container_layout_manager.h" | 5 #include "ash/wm/system_modal_container_layout_manager.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/session_state_delegate.h" | 8 #include "ash/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 | 436 |
437 TEST_F(SystemModalContainerLayoutManagerTest, MultiDisplays) { | 437 TEST_F(SystemModalContainerLayoutManagerTest, MultiDisplays) { |
438 if (!SupportsMultipleDisplays()) | 438 if (!SupportsMultipleDisplays()) |
439 return; | 439 return; |
440 | 440 |
441 UpdateDisplay("500x500,500x500"); | 441 UpdateDisplay("500x500,500x500"); |
442 | 442 |
443 scoped_ptr<aura::Window> normal(OpenToplevelTestWindow(false)); | 443 scoped_ptr<aura::Window> normal(OpenToplevelTestWindow(false)); |
444 normal->SetBounds(gfx::Rect(100, 100, 50, 50)); | 444 normal->SetBounds(gfx::Rect(100, 100, 50, 50)); |
445 | 445 |
446 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 446 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
447 EXPECT_EQ(2U, root_windows.size()); | 447 EXPECT_EQ(2U, root_windows.size()); |
448 aura::Window* container1 = Shell::GetContainer( | 448 aura::Window* container1 = Shell::GetContainer( |
449 root_windows[0], ash::internal::kShellWindowId_SystemModalContainer); | 449 root_windows[0], ash::internal::kShellWindowId_SystemModalContainer); |
450 aura::Window* container2 = Shell::GetContainer( | 450 aura::Window* container2 = Shell::GetContainer( |
451 root_windows[1], ash::internal::kShellWindowId_SystemModalContainer); | 451 root_windows[1], ash::internal::kShellWindowId_SystemModalContainer); |
452 | 452 |
453 scoped_ptr<aura::Window> modal1( | 453 scoped_ptr<aura::Window> modal1( |
454 OpenTestWindowWithParent(container1, true)); | 454 OpenTestWindowWithParent(container1, true)); |
455 EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds()); | 455 EXPECT_TRUE(AllRootWindowsHaveModalBackgrounds()); |
456 EXPECT_TRUE(wm::IsActiveWindow(modal1.get())); | 456 EXPECT_TRUE(wm::IsActiveWindow(modal1.get())); |
(...skipping 29 matching lines...) Expand all Loading... |
486 | 486 |
487 // No more modal screen. | 487 // No more modal screen. |
488 modal1->Hide(); | 488 modal1->Hide(); |
489 TestWindow::CloseTestWindow(modal1.release()); | 489 TestWindow::CloseTestWindow(modal1.release()); |
490 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds()); | 490 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds()); |
491 EXPECT_TRUE(wm::IsActiveWindow(normal.get())); | 491 EXPECT_TRUE(wm::IsActiveWindow(normal.get())); |
492 } | 492 } |
493 | 493 |
494 } // namespace test | 494 } // namespace test |
495 } // namespace ash | 495 } // namespace ash |
OLD | NEW |