Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: ash/wm/dock/docked_window_layout_manager_unittest.cc

Issue 2622053004: ash: Restore previous show state after exiting fullscreen. (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/top_level_window_factory_unittest.cc ('k') | ash/wm/screen_pinning_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_layout_manager.h" 5 #include "ash/common/wm/dock/docked_window_layout_manager.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/shelf/wm_shelf.h" 8 #include "ash/common/shelf/wm_shelf.h"
9 #include "ash/common/test/test_shelf_delegate.h" 9 #include "ash/common/test/test_shelf_delegate.h"
10 #include "ash/common/wm/panels/panel_layout_manager.h" 10 #include "ash/common/wm/panels/panel_layout_manager.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 w3->GetBoundsInScreen().right()); 676 w3->GetBoundsInScreen().right());
677 EXPECT_EQ(kShellWindowId_DockedContainer, w3->parent()->id()); 677 EXPECT_EQ(kShellWindowId_DockedContainer, w3->parent()->id());
678 678
679 // The first window should get hidden but parented by the dock container. 679 // The first window should get hidden but parented by the dock container.
680 EXPECT_TRUE(wm::GetWindowState(w1.get())->IsMinimized()); 680 EXPECT_TRUE(wm::GetWindowState(w1.get())->IsMinimized());
681 EXPECT_TRUE(wm::GetWindowState(w1.get())->IsDocked()); 681 EXPECT_TRUE(wm::GetWindowState(w1.get())->IsDocked());
682 EXPECT_FALSE(w1->IsVisible()); 682 EXPECT_FALSE(w1->IsVisible());
683 EXPECT_EQ(ui::SHOW_STATE_MINIMIZED, 683 EXPECT_EQ(ui::SHOW_STATE_MINIMIZED,
684 w1->GetProperty(aura::client::kShowStateKey)); 684 w1->GetProperty(aura::client::kShowStateKey));
685 EXPECT_EQ(ui::SHOW_STATE_DOCKED, 685 EXPECT_EQ(ui::SHOW_STATE_DOCKED,
686 w1->GetProperty(aura::client::kRestoreShowStateKey)); 686 w1->GetProperty(aura::client::kPreMinimizedShowStateKey));
687 // The other two windows should be still docked. 687 // The other two windows should be still docked.
688 EXPECT_FALSE(wm::GetWindowState(w2.get())->IsMinimized()); 688 EXPECT_FALSE(wm::GetWindowState(w2.get())->IsMinimized());
689 EXPECT_TRUE(wm::GetWindowState(w2.get())->IsDocked()); 689 EXPECT_TRUE(wm::GetWindowState(w2.get())->IsDocked());
690 EXPECT_FALSE(wm::GetWindowState(w3.get())->IsMinimized()); 690 EXPECT_FALSE(wm::GetWindowState(w3.get())->IsMinimized());
691 EXPECT_TRUE(wm::GetWindowState(w3.get())->IsDocked()); 691 EXPECT_TRUE(wm::GetWindowState(w3.get())->IsDocked());
692 EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id()); 692 EXPECT_EQ(kShellWindowId_DockedContainer, w1->parent()->id());
693 } 693 }
694 694
695 // Docks up to three windows and tests that they split vertical space. 695 // Docks up to three windows and tests that they split vertical space.
696 TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) { 696 TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 EXPECT_EQ(work_area.height(), window->GetBoundsInScreen().height()); 802 EXPECT_EQ(work_area.height(), window->GetBoundsInScreen().height());
803 } 803 }
804 804
805 // Tests run twice - on both panels and normal windows 805 // Tests run twice - on both panels and normal windows
806 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 806 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
807 DockedWindowLayoutManagerTest, 807 DockedWindowLayoutManagerTest,
808 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 808 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
809 ui::wm::WINDOW_TYPE_PANEL)); 809 ui::wm::WINDOW_TYPE_PANEL));
810 810
811 } // namespace ash 811 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/top_level_window_factory_unittest.cc ('k') | ash/wm/screen_pinning_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698