OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "ash/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 virtual ~VolumeControllerSoundsTest() {} | 164 virtual ~VolumeControllerSoundsTest() {} |
165 | 165 |
166 virtual void SetUpInProcessBrowserTestFixture() override { | 166 virtual void SetUpInProcessBrowserTestFixture() override { |
167 sounds_manager_ = new SoundsManagerTestImpl(); | 167 sounds_manager_ = new SoundsManagerTestImpl(); |
168 media::SoundsManager::InitializeForTesting(sounds_manager_); | 168 media::SoundsManager::InitializeForTesting(sounds_manager_); |
169 } | 169 } |
170 | 170 |
171 void EnableSpokenFeedback(bool enabled) { | 171 void EnableSpokenFeedback(bool enabled) { |
172 chromeos::AccessibilityManager* manager = | 172 chromeos::AccessibilityManager* manager = |
173 chromeos::AccessibilityManager::Get(); | 173 chromeos::AccessibilityManager::Get(); |
174 manager->EnableSpokenFeedback(enabled, ash::A11Y_NOTIFICATION_NONE); | 174 manager->EnableSpokenFeedback(enabled, ui::A11Y_NOTIFICATION_NONE); |
175 } | 175 } |
176 | 176 |
177 bool is_sound_initialized() const { | 177 bool is_sound_initialized() const { |
178 return sounds_manager_->is_sound_initialized(chromeos::SOUND_VOLUME_ADJUST); | 178 return sounds_manager_->is_sound_initialized(chromeos::SOUND_VOLUME_ADJUST); |
179 } | 179 } |
180 | 180 |
181 int num_play_requests() const { | 181 int num_play_requests() const { |
182 return sounds_manager_->num_play_requests(chromeos::SOUND_VOLUME_ADJUST); | 182 return sounds_manager_->num_play_requests(chromeos::SOUND_VOLUME_ADJUST); |
183 } | 183 } |
184 | 184 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 EXPECT_FALSE(is_sound_initialized()); | 253 EXPECT_FALSE(is_sound_initialized()); |
254 | 254 |
255 // Check that sound isn't played on volume up and volume down. | 255 // Check that sound isn't played on volume up and volume down. |
256 audio_handler_->SetOutputVolumePercent(50); | 256 audio_handler_->SetOutputVolumePercent(50); |
257 VolumeUp(); | 257 VolumeUp(); |
258 VolumeDown(); | 258 VolumeDown(); |
259 EXPECT_EQ(0, num_play_requests()); | 259 EXPECT_EQ(0, num_play_requests()); |
260 } | 260 } |
261 | 261 |
262 } // namespace | 262 } // namespace |
OLD | NEW |