OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ash/common/system/chromeos/audio/tray_audio.h" | |
6 | |
7 #include "ash/common/system/tray/system_tray.h" | |
8 #include "ash/common/test/ash_test.h" | |
9 | |
10 namespace ash { | |
11 | |
12 using TrayAudioTest = AshTest; | |
13 | |
14 // Tests that the volume popup view can be explicitly shown. | |
15 TEST_F(TrayAudioTest, ShowPopUpVolumeView) { | |
16 TrayAudio* tray_audio = GetPrimarySystemTray()->GetTrayAudio(); | |
17 ASSERT_TRUE(tray_audio); | |
18 | |
19 // The volume popup is not visible initially. | |
20 EXPECT_FALSE(tray_audio->volume_view_for_testing()); | |
21 EXPECT_FALSE(tray_audio->pop_up_volume_view_for_testing()); | |
22 | |
23 // Simulate ARC asking to show the volume view. | |
24 TrayAudio::ShowPopUpVolumeView(); | |
25 | |
26 // Volume view is now visible. | |
27 EXPECT_TRUE(tray_audio->volume_view_for_testing()); | |
28 EXPECT_TRUE(tray_audio->pop_up_volume_view_for_testing()); | |
29 } | |
30 | |
31 } // namespace ash | |
OLD | NEW |