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_event_handler.h" | 5 #include "ash/wm/workspace/workspace_event_handler.h" |
6 | 6 |
7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 EXPECT_EQ(work_area.width(), bounds_in_screen.width()); | 135 EXPECT_EQ(work_area.width(), bounds_in_screen.width()); |
136 // Single-axis maximization is not considered real maximization. | 136 // Single-axis maximization is not considered real maximization. |
137 EXPECT_FALSE(window_state->IsMaximized()); | 137 EXPECT_FALSE(window_state->IsMaximized()); |
138 | 138 |
139 // Restore. | 139 // Restore. |
140 generator.DoubleClickLeftButton(); | 140 generator.DoubleClickLeftButton(); |
141 EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString()); | 141 EXPECT_EQ(restored_bounds.ToString(), window->GetBoundsInScreen().ToString()); |
142 | 142 |
143 #if defined(OS_WIN) | 143 #if defined(OS_WIN) |
144 // Multi display test does not run on Win8 bot. crbug.com/247427. | 144 // Multi display test does not run on Win8 bot. crbug.com/247427. |
145 if (base::win::GetVersion() >= base::win::VERSION_WIN8) | 145 if (!SupportsMultipleDisplays()) |
146 return; | 146 return; |
147 #endif | 147 #endif |
148 | 148 |
149 // Verify the double clicking the resize edge works on 2nd display too. | 149 // Verify the double clicking the resize edge works on 2nd display too. |
150 UpdateDisplay("200x200,400x300"); | 150 UpdateDisplay("200x200,400x300"); |
151 gfx::Rect work_area2 = ScreenUtil::GetSecondaryDisplay().work_area(); | 151 gfx::Rect work_area2 = ScreenUtil::GetSecondaryDisplay().work_area(); |
152 restored_bounds.SetRect(220, 20, 50, 50); | 152 restored_bounds.SetRect(220, 20, 50, 50); |
153 window->SetBoundsInScreen(restored_bounds, ScreenUtil::GetSecondaryDisplay()); | 153 window->SetBoundsInScreen(restored_bounds, ScreenUtil::GetSecondaryDisplay()); |
154 aura::Window* second_root = Shell::GetAllRootWindows()[1]; | 154 aura::Window* second_root = Shell::GetAllRootWindows()[1]; |
155 EXPECT_EQ(second_root, window->GetRootWindow()); | 155 EXPECT_EQ(second_root, window->GetRootWindow()); |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 // Second click will go to the header | 542 // Second click will go to the header |
543 delegate.set_window_component(HTCAPTION); | 543 delegate.set_window_component(HTCAPTION); |
544 generator.PressRightButton(); | 544 generator.PressRightButton(); |
545 generator.ReleaseRightButton(); | 545 generator.ReleaseRightButton(); |
546 EXPECT_FALSE(window_state->IsMaximized()); | 546 EXPECT_FALSE(window_state->IsMaximized()); |
547 generator.DoubleClickLeftButton(); | 547 generator.DoubleClickLeftButton(); |
548 EXPECT_FALSE(window_state->IsMaximized()); | 548 EXPECT_FALSE(window_state->IsMaximized()); |
549 } | 549 } |
550 | 550 |
551 } // namespace ash | 551 } // namespace ash |
OLD | NEW |