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