Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: ash/system/night_light/tray_night_light_unittest.cc

Issue 2857103007: [Night Light] CL2: Ash and system tray work (Closed)
Patch Set: Update comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/system/night_light/tray_night_light.cc ('k') | ash/system/tiles/tiles_default_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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"
6
7 #include "ash/shell.h"
8 #include "ash/system/night_light/night_light_controller.h"
9 #include "ash/system/tray/system_tray.h"
10 #include "ash/test/ash_test_base.h"
11
12 namespace ash {
13
14 namespace {
15
16 using TrayNightLightTest = test::AshTestBase;
17
18 // Tests that when NightLight is active, its tray icon in the System Tray is
19 // visible.
20 TEST_F(TrayNightLightTest, TestNightLightTrayVisibility) {
21 SystemTray* tray = GetPrimarySystemTray();
22 TrayNightLight* tray_night_light = tray->tray_night_light();
23 NightLightController* controller = Shell::Get()->night_light_controller();
24 controller->SetEnabled(false);
25 ASSERT_FALSE(controller->enabled());
26 EXPECT_FALSE(tray_night_light->tray_view()->visible());
27 controller->SetEnabled(true);
28 EXPECT_TRUE(tray_night_light->tray_view()->visible());
29 }
30
31 } // namespace
32
33 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/night_light/tray_night_light.cc ('k') | ash/system/tiles/tiles_default_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698