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/common/wm/workspace/workspace_layout_manager.h" | 5 #include "ash/common/wm/workspace/workspace_layout_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 window->SetShowState(ui::SHOW_STATE_MINIMIZED); | 677 window->SetShowState(ui::SHOW_STATE_MINIMIZED); |
678 EXPECT_FALSE(window->IsVisible()); | 678 EXPECT_FALSE(window->IsVisible()); |
679 EXPECT_EQ(ui::SHOW_STATE_MINIMIZED, observer.GetShowStateAndReset()); | 679 EXPECT_EQ(ui::SHOW_STATE_MINIMIZED, observer.GetShowStateAndReset()); |
680 window->Show(); | 680 window->Show(); |
681 EXPECT_TRUE(window->IsVisible()); | 681 EXPECT_TRUE(window->IsVisible()); |
682 EXPECT_EQ(ui::SHOW_STATE_NORMAL, observer.GetShowStateAndReset()); | 682 EXPECT_EQ(ui::SHOW_STATE_NORMAL, observer.GetShowStateAndReset()); |
683 observer.SetWindow(nullptr); | 683 observer.SetWindow(nullptr); |
684 } | 684 } |
685 | 685 |
686 // Tests maximized window size during root window resize. | 686 // Tests maximized window size during root window resize. |
687 #if defined(OS_WIN) && !defined(USE_ASH) | 687 TEST_F(WorkspaceLayoutManagerSoloTest, MaximizeRootWindowResize) { |
688 // TODO(msw): Broken on Windows. http://crbug.com/584038 | |
689 #define MAYBE_MaximizeRootWindowResize DISABLED_MaximizeRootWindowResize | |
690 #else | |
691 #define MAYBE_MaximizeRootWindowResize MaximizeRootWindowResize | |
692 #endif | |
693 TEST_F(WorkspaceLayoutManagerSoloTest, MAYBE_MaximizeRootWindowResize) { | |
694 gfx::Rect bounds(100, 100, 200, 200); | 688 gfx::Rect bounds(100, 100, 200, 200); |
695 std::unique_ptr<WindowOwner> window_owner(CreateTestWindow(bounds)); | 689 std::unique_ptr<WindowOwner> window_owner(CreateTestWindow(bounds)); |
696 WmWindow* window = window_owner->window(); | 690 WmWindow* window = window_owner->window(); |
697 window->SetShowState(ui::SHOW_STATE_MAXIMIZED); | 691 window->SetShowState(ui::SHOW_STATE_MAXIMIZED); |
698 gfx::Rect initial_work_area_bounds = | 692 gfx::Rect initial_work_area_bounds = |
699 wm::GetMaximizedWindowBoundsInParent(window); | 693 wm::GetMaximizedWindowBoundsInParent(window); |
700 EXPECT_EQ(initial_work_area_bounds.ToString(), | 694 EXPECT_EQ(initial_work_area_bounds.ToString(), |
701 window->GetBounds().ToString()); | 695 window->GetBounds().ToString()); |
702 // Enlarge the root window. We should still match the work area size. | 696 // Enlarge the root window. We should still match the work area size. |
703 UpdateDisplay("900x700"); | 697 UpdateDisplay("900x700"); |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 window->SetBounds(keyboard_bounds()); | 1266 window->SetBounds(keyboard_bounds()); |
1273 window->GetWindowState()->set_ignore_keyboard_bounds_change(true); | 1267 window->GetWindowState()->set_ignore_keyboard_bounds_change(true); |
1274 window->Activate(); | 1268 window->Activate(); |
1275 | 1269 |
1276 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); | 1270 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); |
1277 ShowKeyboard(); | 1271 ShowKeyboard(); |
1278 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); | 1272 EXPECT_EQ(keyboard_bounds(), window->GetBounds()); |
1279 } | 1273 } |
1280 | 1274 |
1281 } // namespace ash | 1275 } // namespace ash |
OLD | NEW |