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

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

Issue 2847283002: chromeos: convert remaining AshTest usage to AshTestBase (Closed)
Patch Set: 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/audio/tray_audio_unittest.cc ('k') | ash/test/BUILD.gn » ('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/public/interfaces/update.mojom.h" 7 #include "ash/public/interfaces/update.mojom.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray.h" 9 #include "ash/system/tray/system_tray.h"
10 #include "ash/system/tray/system_tray_controller.h" 10 #include "ash/system/tray/system_tray_controller.h"
11 #include "ash/test/ash_test.h" 11 #include "ash/test/ash_test_base.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "ui/events/event.h" 13 #include "ui/events/event.h"
14 #include "ui/views/controls/label.h" 14 #include "ui/views/controls/label.h"
15 15
16 namespace ash { 16 namespace ash {
17 17
18 using TrayUpdateTest = AshTest; 18 using TrayUpdateTest = test::AshTestBase;
19 19
20 // Tests that the update icon becomes visible when an update becomes 20 // Tests that the update icon becomes visible when an update becomes
21 // available. 21 // available.
22 TEST_F(TrayUpdateTest, VisibilityAfterUpdate) { 22 TEST_F(TrayUpdateTest, VisibilityAfterUpdate) {
23 SystemTray* tray = GetPrimarySystemTray(); 23 SystemTray* tray = GetPrimarySystemTray();
24 TrayUpdate* tray_update = tray->tray_update(); 24 TrayUpdate* tray_update = tray->tray_update();
25 25
26 // The system starts with no update pending, so the icon isn't visible. 26 // The system starts with no update pending, so the icon isn't visible.
27 EXPECT_FALSE(tray_update->tray_view()->visible()); 27 EXPECT_FALSE(tray_update->tray_view()->visible());
28 28
(...skipping 19 matching lines...) Expand all
48 48
49 // Tray item is now visible. 49 // Tray item is now visible.
50 EXPECT_TRUE(tray_update->tray_view()->visible()); 50 EXPECT_TRUE(tray_update->tray_view()->visible());
51 51
52 tray->ShowDefaultView(BUBBLE_CREATE_NEW); 52 tray->ShowDefaultView(BUBBLE_CREATE_NEW);
53 base::string16 label = tray_update->GetLabelForTesting()->text(); 53 base::string16 label = tray_update->GetLabelForTesting()->text();
54 EXPECT_EQ("Restart to update Adobe Flash Player", base::UTF16ToUTF8(label)); 54 EXPECT_EQ("Restart to update Adobe Flash Player", base::UTF16ToUTF8(label));
55 } 55 }
56 56
57 } // namespace ash 57 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/audio/tray_audio_unittest.cc ('k') | ash/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698