OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/shell_window_ids.h" | 5 #include "ash/common/shell_window_ids.h" |
6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "ash/wm/session_state_animator.h" | 8 #include "ash/wm/session_state_animator.h" |
9 #include "ash/wm/session_state_animator_impl.h" | 9 #include "ash/wm/session_state_animator_impl.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 aura::Window::Windows containers; | 32 aura::Window::Windows containers; |
33 | 33 |
34 // Test ROOT_CONTAINER mask. | 34 // Test ROOT_CONTAINER mask. |
35 aura::Window* root_window = Shell::GetPrimaryRootWindow(); | 35 aura::Window* root_window = Shell::GetPrimaryRootWindow(); |
36 SessionStateAnimatorImpl::GetContainers(SessionStateAnimator::ROOT_CONTAINER, | 36 SessionStateAnimatorImpl::GetContainers(SessionStateAnimator::ROOT_CONTAINER, |
37 &containers); | 37 &containers); |
38 EXPECT_EQ(root_window, containers[0]); | 38 EXPECT_EQ(root_window, containers[0]); |
39 | 39 |
40 containers.clear(); | 40 containers.clear(); |
41 | 41 |
42 SessionStateAnimatorImpl::GetContainers( | 42 SessionStateAnimatorImpl::GetContainers(SessionStateAnimator::WALLPAPER, |
43 SessionStateAnimator::DESKTOP_BACKGROUND, &containers); | 43 &containers); |
44 EXPECT_TRUE(ContainersHaveWindowWithId( | 44 EXPECT_TRUE(ContainersHaveWindowWithId(containers, |
45 containers, kShellWindowId_DesktopBackgroundContainer)); | 45 kShellWindowId_WallpaperContainer)); |
46 | 46 |
47 containers.clear(); | 47 containers.clear(); |
48 | 48 |
49 // Check for shelf in launcher. | 49 // Check for shelf in launcher. |
50 SessionStateAnimatorImpl::GetContainers(SessionStateAnimator::LAUNCHER, | 50 SessionStateAnimatorImpl::GetContainers(SessionStateAnimator::LAUNCHER, |
51 &containers); | 51 &containers); |
52 EXPECT_TRUE( | 52 EXPECT_TRUE( |
53 ContainersHaveWindowWithId(containers, kShellWindowId_ShelfContainer)); | 53 ContainersHaveWindowWithId(containers, kShellWindowId_ShelfContainer)); |
54 | 54 |
55 containers.clear(); | 55 containers.clear(); |
56 | 56 |
57 SessionStateAnimatorImpl::GetContainers( | 57 SessionStateAnimatorImpl::GetContainers( |
58 SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, &containers); | 58 SessionStateAnimator::NON_LOCK_SCREEN_CONTAINERS, &containers); |
59 EXPECT_TRUE(ParentHasWindowWithId( | 59 EXPECT_TRUE(ParentHasWindowWithId( |
60 containers[0], kShellWindowId_NonLockScreenContainersContainer)); | 60 containers[0], kShellWindowId_NonLockScreenContainersContainer)); |
61 | 61 |
62 containers.clear(); | 62 containers.clear(); |
63 | 63 |
64 // Check for lock screen containers. | 64 // Check for lock screen containers. |
65 SessionStateAnimatorImpl::GetContainers( | 65 SessionStateAnimatorImpl::GetContainers( |
66 SessionStateAnimator::LOCK_SCREEN_BACKGROUND, &containers); | 66 SessionStateAnimator::LOCK_SCREEN_WALLPAPER, &containers); |
67 EXPECT_TRUE(ContainersHaveWindowWithId( | 67 EXPECT_TRUE(ContainersHaveWindowWithId( |
68 containers, kShellWindowId_LockScreenBackgroundContainer)); | 68 containers, kShellWindowId_LockScreenWallpaperContainer)); |
69 | 69 |
70 containers.clear(); | 70 containers.clear(); |
71 | 71 |
72 // Check for the lock screen containers container. | 72 // Check for the lock screen containers container. |
73 SessionStateAnimatorImpl::GetContainers( | 73 SessionStateAnimatorImpl::GetContainers( |
74 SessionStateAnimator::LOCK_SCREEN_RELATED_CONTAINERS, &containers); | 74 SessionStateAnimator::LOCK_SCREEN_RELATED_CONTAINERS, &containers); |
75 EXPECT_TRUE(ContainersHaveWindowWithId( | 75 EXPECT_TRUE(ContainersHaveWindowWithId( |
76 containers, kShellWindowId_LockScreenRelatedContainersContainer)); | 76 containers, kShellWindowId_LockScreenRelatedContainersContainer)); |
77 | 77 |
78 // Empty mask should clear the container. | 78 // Empty mask should clear the container. |
79 SessionStateAnimatorImpl::GetContainers(0, &containers); | 79 SessionStateAnimatorImpl::GetContainers(0, &containers); |
80 EXPECT_TRUE(containers.empty()); | 80 EXPECT_TRUE(containers.empty()); |
81 } | 81 } |
82 | 82 |
83 } // namespace ash | 83 } // namespace ash |
OLD | NEW |