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

Side by Side Diff: ash/wm/workspace/workspace_manager_unittest.cc

Issue 10830029: Makes maximized windows go in their own workspace regardless of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/workspace/workspace_manager.cc ('k') | no next file » | 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) 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 scoped_ptr<Window> w2(CreateTestWindow()); 665 scoped_ptr<Window> w2(CreateTestWindow());
666 666
667 w1->Show(); 667 w1->Show();
668 w1->SetProperty(aura::client::kAnimationsDisabledKey, true); 668 w1->SetProperty(aura::client::kAnimationsDisabledKey, true);
669 669
670 w2->Show(); 670 w2->Show();
671 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 671 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
672 EXPECT_TRUE(w1->GetProperty(aura::client::kAnimationsDisabledKey)); 672 EXPECT_TRUE(w1->GetProperty(aura::client::kAnimationsDisabledKey));
673 } 673 }
674 674
675 // Verifies a window marked as persisting across all workspaces ends up in its
676 // own workspace when maximized.
677 TEST_F(WorkspaceManagerTest, MaximizeDontPersistEndsUpInOwnWorkspace) {
678 scoped_ptr<Window> w1(CreateTestWindow());
679
680 SetPersistsAcrossAllWorkspaces(
681 w1.get(),
682 WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_YES);
683 w1->Show();
684
685 // Shouldn't contain the window initially.
686 EXPECT_FALSE(manager_->Contains(w1.get()));
687
688 // Maximize should trigger containing the window.
689 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
690 EXPECT_TRUE(manager_->Contains(w1.get()));
691
692 // And resetting to normal should remove it.
693 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
694 EXPECT_FALSE(manager_->Contains(w1.get()));
695 }
696
675 } // namespace internal 697 } // namespace internal
676 } // namespace ash 698 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698