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

Side by Side Diff: ash/system/update/tray_update_unittest.cc

Issue 2734733002: Revert "chromeos: Move files in //ash/common to //ash, part 3" (Closed)
Patch Set: Created 3 years, 9 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/update/tray_update.cc ('k') | ash/system/user/button_from_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/update/tray_update.h" 5 #include "ash/system/update/tray_update.h"
6 6
7 #include "ash/common/wm_shell.h"
7 #include "ash/public/interfaces/update.mojom.h" 8 #include "ash/public/interfaces/update.mojom.h"
8 #include "ash/system/tray/system_tray.h" 9 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_controller.h" 10 #include "ash/system/tray/system_tray_controller.h"
10 #include "ash/test/ash_test.h" 11 #include "ash/test/ash_test.h"
11 #include "ash/wm_shell.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 using TrayUpdateTest = AshTest; 15 using TrayUpdateTest = AshTest;
16 16
17 // Tests that the update icon becomes visible when an update becomes 17 // Tests that the update icon becomes visible when an update becomes
18 // available. 18 // available.
19 TEST_F(TrayUpdateTest, VisibilityAfterUpdate) { 19 TEST_F(TrayUpdateTest, VisibilityAfterUpdate) {
20 TrayUpdate* tray_update = GetPrimarySystemTray()->tray_update(); 20 TrayUpdate* tray_update = GetPrimarySystemTray()->tray_update();
21 21
22 // The system starts with no update pending, so the icon isn't visible. 22 // The system starts with no update pending, so the icon isn't visible.
23 EXPECT_FALSE(tray_update->tray_view()->visible()); 23 EXPECT_FALSE(tray_update->tray_view()->visible());
24 24
25 // Simulate an update. 25 // Simulate an update.
26 WmShell::Get()->system_tray_controller()->ShowUpdateIcon( 26 WmShell::Get()->system_tray_controller()->ShowUpdateIcon(
27 mojom::UpdateSeverity::LOW, false); 27 mojom::UpdateSeverity::LOW, false);
28 28
29 // Tray item is now visible. 29 // Tray item is now visible.
30 EXPECT_TRUE(tray_update->tray_view()->visible()); 30 EXPECT_TRUE(tray_update->tray_view()->visible());
31 } 31 }
32 32
33 } // namespace ash 33 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/update/tray_update.cc ('k') | ash/system/user/button_from_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698