OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/common/wm/dock/docked_window_resizer.h" | 5 #include "ash/common/wm/dock/docked_window_resizer.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
9 #include "ash/common/shelf/shelf_model.h" | 9 #include "ash/common/shelf/shelf_model.h" |
10 #include "ash/common/shelf/shelf_types.h" | 10 #include "ash/common/shelf/shelf_types.h" |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 // Move a docked window to the second display | 723 // Move a docked window to the second display |
724 TEST_P(DockedWindowResizerTest, DragAcrossDisplays) { | 724 TEST_P(DockedWindowResizerTest, DragAcrossDisplays) { |
725 if (!SupportsMultipleDisplays()) | 725 if (!SupportsMultipleDisplays()) |
726 return; | 726 return; |
727 | 727 |
728 UpdateDisplay("800x800,800x800"); | 728 UpdateDisplay("800x800,800x800"); |
729 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 729 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
730 EXPECT_EQ(2, static_cast<int>(root_windows.size())); | 730 EXPECT_EQ(2, static_cast<int>(root_windows.size())); |
731 std::unique_ptr<aura::Window> window( | 731 std::unique_ptr<aura::Window> window( |
732 CreateTestWindow(gfx::Rect(0, 0, 201, 201))); | 732 CreateTestWindow(gfx::Rect(0, 0, 201, 201))); |
733 gfx::Rect initial_bounds = window->GetBoundsInScreen(); | |
734 EXPECT_EQ(root_windows[0], window->GetRootWindow()); | 733 EXPECT_EQ(root_windows[0], window->GetRootWindow()); |
735 | 734 |
736 DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0); | 735 DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0); |
737 // The window should be docked at the right edge. | 736 // The window should be docked at the right edge. |
738 EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), | 737 EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), |
739 window->GetBoundsInScreen().right()); | 738 window->GetBoundsInScreen().right()); |
740 EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); | 739 EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); |
741 | 740 |
742 // Try dragging to the right - enough to get it peeking at the other screen | 741 // Try dragging to the right - enough to get it peeking at the other screen |
743 // but not enough to land in the other screen. | 742 // but not enough to land in the other screen. |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1613 EXPECT_TRUE(window_state->IsMaximized()); | 1612 EXPECT_TRUE(window_state->IsMaximized()); |
1614 } | 1613 } |
1615 | 1614 |
1616 // Tests run twice - on both panels and normal windows | 1615 // Tests run twice - on both panels and normal windows |
1617 INSTANTIATE_TEST_CASE_P(NormalOrPanel, | 1616 INSTANTIATE_TEST_CASE_P(NormalOrPanel, |
1618 DockedWindowResizerTest, | 1617 DockedWindowResizerTest, |
1619 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, | 1618 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, |
1620 ui::wm::WINDOW_TYPE_PANEL)); | 1619 ui::wm::WINDOW_TYPE_PANEL)); |
1621 | 1620 |
1622 } // namespace ash | 1621 } // namespace ash |
OLD | NEW |