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

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

Issue 10454107: Revert 139494 - ash: Improved window maximize/restore animations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
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 12 matching lines...) Expand all
23 #include "ui/compositor/layer.h" 23 #include "ui/compositor/layer.h"
24 #include "ui/gfx/screen.h" 24 #include "ui/gfx/screen.h"
25 25
26 using aura::Window; 26 using aura::Window;
27 27
28 namespace ash { 28 namespace ash {
29 namespace internal { 29 namespace internal {
30 30
31 class WorkspaceManagerTest : public test::AshTestBase { 31 class WorkspaceManagerTest : public test::AshTestBase {
32 public: 32 public:
33 WorkspaceManagerTest() : manager_(NULL) {} 33 WorkspaceManagerTest() {}
34 virtual ~WorkspaceManagerTest() {} 34 virtual ~WorkspaceManagerTest() {}
35 35
36 aura::Window* CreateTestWindowUnparented() { 36 aura::Window* CreateTestWindowUnparented() {
37 aura::Window* window = new aura::Window(NULL); 37 aura::Window* window = new aura::Window(NULL);
38 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL); 38 window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
39 window->SetType(aura::client::WINDOW_TYPE_NORMAL); 39 window->SetType(aura::client::WINDOW_TYPE_NORMAL);
40 window->Init(ui::LAYER_TEXTURED); 40 window->Init(ui::LAYER_TEXTURED);
41 return window; 41 return window;
42 } 42 }
43 43
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 564
565 // Activate w2 again, shouldn't switch workspaces. 565 // Activate w2 again, shouldn't switch workspaces.
566 wm::ActivateWindow(w2.get()); 566 wm::ActivateWindow(w2.get());
567 EXPECT_EQ(Workspace::TYPE_MANAGED, active_workspace()->type()); 567 EXPECT_EQ(Workspace::TYPE_MANAGED, active_workspace()->type());
568 EXPECT_FALSE(w1->layer()->IsDrawn()); 568 EXPECT_FALSE(w1->layer()->IsDrawn());
569 EXPECT_TRUE(w2->layer()->IsDrawn()); 569 EXPECT_TRUE(w2->layer()->IsDrawn());
570 EXPECT_TRUE(w3->layer()->IsDrawn()); 570 EXPECT_TRUE(w3->layer()->IsDrawn());
571 } 571 }
572 572
573 // Verifies Show()ing a minimized window that persists across all workspaces 573 // Verifies Show()ing a minimized window that persists across all workspaces
574 // unminimizes the window. 574 // unminimizes thew indow.
575 TEST_F(WorkspaceManagerTest, ShowMinimizedPersistWindow) { 575 TEST_F(WorkspaceManagerTest, ShowMinimizedPersistWindow) {
576 // Create a window that persists across all workspaces. 576 // Create a window that persists across all workspaces.
577 scoped_ptr<Window> w1(CreateTestWindow()); 577 scoped_ptr<Window> w1(CreateTestWindow());
578 SetPersistsAcrossAllWorkspaces( 578 SetPersistsAcrossAllWorkspaces(
579 w1.get(), 579 w1.get(),
580 WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_YES); 580 WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_YES);
581 w1->Show(); 581 w1->Show();
582 wm::ActivateWindow(w1.get()); 582 wm::ActivateWindow(w1.get());
583 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); 583 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
584 EXPECT_FALSE(w1->IsVisible()); 584 EXPECT_FALSE(w1->IsVisible());
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 w1->Show(); 664 w1->Show();
665 w1->SetProperty(aura::client::kAnimationsDisabledKey, true); 665 w1->SetProperty(aura::client::kAnimationsDisabledKey, true);
666 666
667 w2->Show(); 667 w2->Show();
668 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 668 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
669 EXPECT_TRUE(w1->GetProperty(aura::client::kAnimationsDisabledKey)); 669 EXPECT_TRUE(w1->GetProperty(aura::client::kAnimationsDisabledKey));
670 } 670 }
671 671
672 } // namespace internal 672 } // namespace internal
673 } // namespace ash 673 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698