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_manager.h" | 5 #include "ash/wm/workspace/workspace_manager.h" |
6 | 6 |
7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 | 688 |
689 // Maximize should trigger containing the window. | 689 // Maximize should trigger containing the window. |
690 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); | 690 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
691 EXPECT_TRUE(manager_->Contains(w1.get())); | 691 EXPECT_TRUE(manager_->Contains(w1.get())); |
692 | 692 |
693 // And resetting to normal should remove it. | 693 // And resetting to normal should remove it. |
694 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); | 694 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); |
695 EXPECT_FALSE(manager_->Contains(w1.get())); | 695 EXPECT_FALSE(manager_->Contains(w1.get())); |
696 } | 696 } |
697 | 697 |
| 698 // Verifies going from maximized to minimized sets the right state for painting |
| 699 // the background of the launcher. |
| 700 TEST_F(WorkspaceManagerTest, MinimizeResetsVisibility) { |
| 701 scoped_ptr<Window> w1(CreateTestWindow()); |
| 702 w1->Show(); |
| 703 wm::ActivateWindow(w1.get()); |
| 704 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
| 705 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); |
| 706 EXPECT_EQ(ShelfLayoutManager::VISIBLE, |
| 707 Shell::GetInstance()->shelf()->visibility_state()); |
| 708 EXPECT_FALSE(Shell::GetInstance()->launcher()->paints_background()); |
| 709 } |
| 710 |
698 } // namespace internal | 711 } // namespace internal |
699 } // namespace ash | 712 } // namespace ash |
OLD | NEW |