Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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/ash_touch_exploration_manager_chromeos.h" | |
| 6 | |
| 7 #include "ash/root_window_controller.h" | |
| 8 #include "ash/shell.h" | |
| 9 #include "ash/test/ash_test_base.h" | |
| 10 #include "chromeos/audio/cras_audio_handler.h" | |
| 11 | |
| 12 namespace ash { | |
| 13 | |
| 14 typedef test::AshTestBase AshTouchExplorationManagerTest; | |
| 15 | |
| 16 TEST_F(AshTouchExplorationManagerTest, AdjustSound) { | |
| 17 RootWindowController* controller = Shell::GetPrimaryRootWindowController(); | |
| 18 AshTouchExplorationManagerChromeOS* touch_exploration_manager = | |
| 19 new AshTouchExplorationManagerChromeOS(controller); | |
| 20 chromeos::CrasAudioHandler* audio_handler_ = | |
|
James Cook
2014/07/16 00:08:47
no underscore after "audio_handler"
lisayin
2014/07/17 16:56:17
Done.
| |
| 21 chromeos::CrasAudioHandler::Get(); | |
| 22 | |
| 23 touch_exploration_manager->SetOutputLevel(10); | |
| 24 EXPECT_EQ(audio_handler_->GetOutputVolumePercent(), 10); | |
| 25 EXPECT_FALSE(audio_handler_->IsOutputMuted()); | |
| 26 | |
| 27 touch_exploration_manager->SetOutputLevel(100); | |
| 28 EXPECT_EQ(audio_handler_->GetOutputVolumePercent(), 100); | |
| 29 EXPECT_FALSE(audio_handler_->IsOutputMuted()); | |
| 30 | |
| 31 touch_exploration_manager->SetOutputLevel(0); | |
| 32 EXPECT_EQ(audio_handler_->GetOutputVolumePercent(), 0); | |
| 33 EXPECT_TRUE(audio_handler_->IsOutputMuted()); | |
| 34 } | |
| 35 | |
| 36 } // namespace ash | |
| OLD | NEW |