OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ash/system/night_light/tray_night_light.h" | |
James Cook
2017/05/08 16:09:07
super nit: blank line below
afakhry
2017/05/08 17:36:26
Done.
| |
6 #include "ash/shell.h" | |
7 #include "ash/system/night_light/night_light_controller.h" | |
8 #include "ash/system/tray/system_tray.h" | |
9 #include "ash/test/ash_test_base.h" | |
10 | |
11 using ash::Shell; | |
James Cook
2017/05/08 16:09:07
not needed, since you have namespace ash below
afakhry
2017/05/08 17:36:26
Yes, I know. Eclipse adds these automatically with
| |
12 using ash::test::AshTestBase; | |
James Cook
2017/05/08 16:09:07
ditto
afakhry
2017/05/08 17:36:26
Done.
| |
13 | |
14 namespace ash { | |
15 | |
16 namespace { | |
17 | |
18 using TrayNightLightTest = test::AshTestBase; | |
19 | |
20 // Tests that when NightLight is active, its tray icon in the System Tray is | |
21 // visible. | |
22 TEST_F(TrayNightLightTest, TestNightLightTrayVisibility) { | |
23 SystemTray* tray = GetPrimarySystemTray(); | |
24 TrayNightLight* tray_night_light = tray->tray_night_light(); | |
25 NightLightController* controller = Shell::Get()->night_light_controller(); | |
26 ASSERT_FALSE(controller->enabled()); | |
27 EXPECT_FALSE(tray_night_light->tray_view()->visible()); | |
28 controller->Toggle(); | |
James Cook
2017/05/08 16:09:07
optional: ditto re: Toggle vs SetEnabled
afakhry
2017/05/08 17:36:26
Done.
| |
29 EXPECT_TRUE(tray_night_light->tray_view()->visible()); | |
30 } | |
31 | |
32 } // namespace | |
33 | |
34 } // namespace ash | |
OLD | NEW |