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

Unified Diff: ash/common/system/chromeos/audio/tray_audio_unittest.cc

Issue 2489723005: chromeos: Make system tray audio item observe CrasAudioHandler directly (Closed)
Patch Set: rebase Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/chromeos/audio/tray_audio.cc ('k') | ash/common/system/tray/system_tray_notifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/audio/tray_audio_unittest.cc
diff --git a/ash/common/system/chromeos/audio/tray_audio_unittest.cc b/ash/common/system/chromeos/audio/tray_audio_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e0a21acf61ec74f4a258158d85581e6e7d871333
--- /dev/null
+++ b/ash/common/system/chromeos/audio/tray_audio_unittest.cc
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/common/system/chromeos/audio/tray_audio.h"
+
+#include "ash/common/system/tray/system_tray.h"
+#include "ash/common/test/ash_test.h"
+
+namespace ash {
+
+using TrayAudioTest = AshTest;
+
+// Tests that the volume popup view can be explicitly shown.
+TEST_F(TrayAudioTest, ShowPopUpVolumeView) {
+ TrayAudio* tray_audio = GetPrimarySystemTray()->GetTrayAudio();
+ ASSERT_TRUE(tray_audio);
+
+ // The volume popup is not visible initially.
+ EXPECT_FALSE(tray_audio->volume_view_for_testing());
+ EXPECT_FALSE(tray_audio->pop_up_volume_view_for_testing());
+
+ // Simulate ARC asking to show the volume view.
+ TrayAudio::ShowPopUpVolumeView();
+
+ // Volume view is now visible.
+ EXPECT_TRUE(tray_audio->volume_view_for_testing());
+ EXPECT_TRUE(tray_audio->pop_up_volume_view_for_testing());
+}
+
+} // namespace ash
« no previous file with comments | « ash/common/system/chromeos/audio/tray_audio.cc ('k') | ash/common/system/tray/system_tray_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698