OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/system/overview/overview_button_tray.h" | 5 #include "ash/system/overview/overview_button_tray.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shelf/shelf_types.h" | 9 #include "ash/shelf/shelf_types.h" |
10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/system/status_area_widget.h" | 12 #include "ash/system/status_area_widget.h" |
| 13 #include "ash/system/tray/tray_background_view.h" |
13 #include "ash/system/user/login_status.h" | 14 #include "ash/system/user/login_status.h" |
14 #include "ash/test/ash_test_base.h" | 15 #include "ash/test/ash_test_base.h" |
15 #include "ash/test/status_area_widget_test_helper.h" | 16 #include "ash/test/status_area_widget_test_helper.h" |
16 #include "ash/wm/overview/window_selector_controller.h" | 17 #include "ash/wm/overview/window_selector_controller.h" |
17 #include "base/time/time.h" | 18 #include "base/time/time.h" |
18 #include "ui/events/event.h" | 19 #include "ui/events/event.h" |
19 #include "ui/events/event_constants.h" | 20 #include "ui/events/event_constants.h" |
20 #include "ui/events/gestures/gesture_types.h" | 21 #include "ui/events/gestures/gesture_types.h" |
21 #include "ui/views/controls/image_view.h" | 22 #include "ui/views/controls/image_view.h" |
22 | 23 |
(...skipping 11 matching lines...) Expand all Loading... |
34 overview_button_tray(); | 35 overview_button_tray(); |
35 } | 36 } |
36 | 37 |
37 } // namespace | 38 } // namespace |
38 | 39 |
39 class OverviewButtonTrayTest : public test::AshTestBase { | 40 class OverviewButtonTrayTest : public test::AshTestBase { |
40 public: | 41 public: |
41 OverviewButtonTrayTest() {} | 42 OverviewButtonTrayTest() {} |
42 virtual ~OverviewButtonTrayTest() {} | 43 virtual ~OverviewButtonTrayTest() {} |
43 | 44 |
| 45 virtual void SetUp() OVERRIDE { |
| 46 TrayBackgroundView::DisableAnimationsForTest(); |
| 47 test::AshTestBase::SetUp(); |
| 48 } |
| 49 |
44 protected: | 50 protected: |
45 views::ImageView* GetImageView(OverviewButtonTray* tray) { | 51 views::ImageView* GetImageView(OverviewButtonTray* tray) { |
46 return tray->icon_; | 52 return tray->icon_; |
47 } | 53 } |
48 | 54 |
49 private: | 55 private: |
50 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTrayTest); | 56 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTrayTest); |
51 }; | 57 }; |
52 | 58 |
53 // Ensures that creation doesn't cause any crashes and adds the image icon. | 59 // Ensures that creation doesn't cause any crashes and adds the image icon. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_NONE); | 124 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_NONE); |
119 EXPECT_FALSE(GetTray()->visible()); | 125 EXPECT_FALSE(GetTray()->visible()); |
120 SetUserLoggedIn(true); | 126 SetUserLoggedIn(true); |
121 SetSessionStarted(true); | 127 SetSessionStarted(true); |
122 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER); | 128 Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER); |
123 EXPECT_TRUE(GetTray()->visible()); | 129 EXPECT_TRUE(GetTray()->visible()); |
124 Shell::GetInstance()->EnableMaximizeModeWindowManager(false); | 130 Shell::GetInstance()->EnableMaximizeModeWindowManager(false); |
125 } | 131 } |
126 | 132 |
127 } // namespace ash | 133 } // namespace ash |
OLD | NEW |