| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/tiles/tray_tiles.h" | 5 #include "ash/system/tiles/tray_tiles.h" |
| 6 | 6 |
| 7 #include "ash/system/night_light/night_light_toggle_button.h" |
| 7 #include "ash/system/tiles/tiles_default_view.h" | 8 #include "ash/system/tiles/tiles_default_view.h" |
| 8 #include "ash/system/tray/system_menu_button.h" | 9 #include "ash/system/tray/system_menu_button.h" |
| 9 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/test/test_session_controller_client.h" | 11 #include "ash/test/test_session_controller_client.h" |
| 11 #include "components/user_manager/user_type.h" | 12 #include "components/user_manager/user_type.h" |
| 12 #include "ui/views/view.h" | 13 #include "ui/views/view.h" |
| 13 | 14 |
| 14 using views::Button; | 15 using views::Button; |
| 15 | 16 |
| 16 namespace ash { | 17 namespace ash { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 32 } | 33 } |
| 33 | 34 |
| 34 views::CustomButton* GetSettingsButton() { | 35 views::CustomButton* GetSettingsButton() { |
| 35 return tray_tiles()->default_view_->settings_button_; | 36 return tray_tiles()->default_view_->settings_button_; |
| 36 } | 37 } |
| 37 | 38 |
| 38 views::CustomButton* GetHelpButton() { | 39 views::CustomButton* GetHelpButton() { |
| 39 return tray_tiles()->default_view_->help_button_; | 40 return tray_tiles()->default_view_->help_button_; |
| 40 } | 41 } |
| 41 | 42 |
| 42 views::CustomButton* GetNightLightButton() { | 43 NightLightToggleButton* GetNightLightButton() { |
| 43 return tray_tiles()->default_view_->night_light_button_; | 44 return tray_tiles()->default_view_->night_light_button_; |
| 44 } | 45 } |
| 45 | 46 |
| 46 views::CustomButton* GetLockButton() { | 47 views::CustomButton* GetLockButton() { |
| 47 return tray_tiles()->default_view_->lock_button_; | 48 return tray_tiles()->default_view_->lock_button_; |
| 48 } | 49 } |
| 49 | 50 |
| 50 views::CustomButton* GetPowerButton() { | 51 views::CustomButton* GetPowerButton() { |
| 51 return tray_tiles()->default_view_->power_button_; | 52 return tray_tiles()->default_view_->power_button_; |
| 52 } | 53 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 std::unique_ptr<views::View> default_view( | 117 std::unique_ptr<views::View> default_view( |
| 117 tray_tiles()->CreateDefaultViewForTesting()); | 118 tray_tiles()->CreateDefaultViewForTesting()); |
| 118 EXPECT_EQ(Button::STATE_DISABLED, GetSettingsButton()->state()); | 119 EXPECT_EQ(Button::STATE_DISABLED, GetSettingsButton()->state()); |
| 119 EXPECT_EQ(Button::STATE_DISABLED, GetHelpButton()->state()); | 120 EXPECT_EQ(Button::STATE_DISABLED, GetHelpButton()->state()); |
| 120 EXPECT_EQ(Button::STATE_DISABLED, GetNightLightButton()->state()); | 121 EXPECT_EQ(Button::STATE_DISABLED, GetNightLightButton()->state()); |
| 121 EXPECT_EQ(Button::STATE_DISABLED, GetLockButton()->state()); | 122 EXPECT_EQ(Button::STATE_DISABLED, GetLockButton()->state()); |
| 122 EXPECT_EQ(Button::STATE_NORMAL, GetPowerButton()->state()); | 123 EXPECT_EQ(Button::STATE_NORMAL, GetPowerButton()->state()); |
| 123 } | 124 } |
| 124 | 125 |
| 125 } // namespace ash | 126 } // namespace ash |
| OLD | NEW |