| 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/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
| 8 #include "ash/common/login_status.h" | 8 #include "ash/common/login_status.h" |
| 9 #include "ash/common/shelf/shelf_types.h" | 9 #include "ash/common/shelf/shelf_types.h" |
| 10 #include "ash/common/wm/overview/window_selector_controller.h" | 10 #include "ash/common/wm/overview/window_selector_controller.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 void OverviewButtonTrayTest::SetUp() { | 69 void OverviewButtonTrayTest::SetUp() { |
| 70 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 70 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 71 switches::kAshUseFirstDisplayAsInternal); | 71 switches::kAshUseFirstDisplayAsInternal); |
| 72 AshTestBase::SetUp(); | 72 AshTestBase::SetUp(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void OverviewButtonTrayTest::NotifySessionStateChanged() { | 75 void OverviewButtonTrayTest::NotifySessionStateChanged() { |
| 76 GetTray()->SessionStateChanged( | 76 GetTray()->SessionStateChanged( |
| 77 ash_test_helper()->GetTestSessionStateDelegate()->GetSessionState()); | 77 test::AshTestHelper::GetTestSessionStateDelegate()->GetSessionState()); |
| 78 } | 78 } |
| 79 | 79 |
| 80 // Ensures that creation doesn't cause any crashes and adds the image icon. | 80 // Ensures that creation doesn't cause any crashes and adds the image icon. |
| 81 TEST_F(OverviewButtonTrayTest, BasicConstruction) { | 81 TEST_F(OverviewButtonTrayTest, BasicConstruction) { |
| 82 EXPECT_TRUE(GetImageView(GetTray()) != NULL); | 82 EXPECT_TRUE(GetImageView(GetTray()) != NULL); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // Test that maximize mode toggle changes visibility. | 85 // Test that maximize mode toggle changes visibility. |
| 86 // OverviewButtonTray should only be visible when MaximizeMode is enabled. | 86 // OverviewButtonTray should only be visible when MaximizeMode is enabled. |
| 87 // By default the system should not have MaximizeMode enabled. | 87 // By default the system should not have MaximizeMode enabled. |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 ->maximize_mode_controller() | 270 ->maximize_mode_controller() |
| 271 ->EnableMaximizeModeWindowManager(true); | 271 ->EnableMaximizeModeWindowManager(true); |
| 272 EXPECT_TRUE(GetTray()->visible()); | 272 EXPECT_TRUE(GetTray()->visible()); |
| 273 Shell::GetInstance() | 273 Shell::GetInstance() |
| 274 ->maximize_mode_controller() | 274 ->maximize_mode_controller() |
| 275 ->EnableMaximizeModeWindowManager(false); | 275 ->EnableMaximizeModeWindowManager(false); |
| 276 EXPECT_FALSE(GetTray()->visible()); | 276 EXPECT_FALSE(GetTray()->visible()); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace ash | 279 } // namespace ash |
| OLD | NEW |