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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 VolumeUp(); | 232 VolumeUp(); |
233 ASSERT_FALSE(audio_handler_->IsOutputMuted()); | 233 ASSERT_FALSE(audio_handler_->IsOutputMuted()); |
234 EXPECT_EQ(4, num_play_requests()); | 234 EXPECT_EQ(4, num_play_requests()); |
235 } | 235 } |
236 | 236 |
237 class VolumeControllerSoundsDisabledTest : public VolumeControllerSoundsTest { | 237 class VolumeControllerSoundsDisabledTest : public VolumeControllerSoundsTest { |
238 public: | 238 public: |
239 VolumeControllerSoundsDisabledTest() {} | 239 VolumeControllerSoundsDisabledTest() {} |
240 virtual ~VolumeControllerSoundsDisabledTest() {} | 240 virtual ~VolumeControllerSoundsDisabledTest() {} |
241 | 241 |
242 virtual void SetUpCommandLine(CommandLine* command_line) override { | 242 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
243 VolumeControllerSoundsTest::SetUpCommandLine(command_line); | 243 VolumeControllerSoundsTest::SetUpCommandLine(command_line); |
244 command_line->AppendSwitch(chromeos::switches::kDisableVolumeAdjustSound); | 244 command_line->AppendSwitch(chromeos::switches::kDisableVolumeAdjustSound); |
245 } | 245 } |
246 | 246 |
247 private: | 247 private: |
248 DISALLOW_COPY_AND_ASSIGN(VolumeControllerSoundsDisabledTest); | 248 DISALLOW_COPY_AND_ASSIGN(VolumeControllerSoundsDisabledTest); |
249 }; | 249 }; |
250 | 250 |
251 IN_PROC_BROWSER_TEST_F(VolumeControllerSoundsDisabledTest, | 251 IN_PROC_BROWSER_TEST_F(VolumeControllerSoundsDisabledTest, |
252 VolumeAdjustSounds) { | 252 VolumeAdjustSounds) { |
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 |