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

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: Rebase + one missed 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
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"
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698