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

Side by Side Diff: extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc

Issue 873473003: Update {virtual,override,final} to follow C++11 style in extensions, round 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "extensions/shell/browser/shell_audio_controller_chromeos.h" 5 #include "extensions/shell/browser/shell_audio_controller_chromeos.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chromeos/audio/audio_device.h" 8 #include "chromeos/audio/audio_device.h"
9 #include "chromeos/audio/audio_devices_pref_handler.h" 9 #include "chromeos/audio/audio_devices_pref_handler.h"
10 #include "chromeos/audio/cras_audio_handler.h" 10 #include "chromeos/audio/cras_audio_handler.h"
(...skipping 18 matching lines...) Expand all
29 audio_client_ = new chromeos::FakeCrasAudioClient(); 29 audio_client_ = new chromeos::FakeCrasAudioClient();
30 audio_client_->SetAudioNodesForTesting(AudioNodeList()); 30 audio_client_->SetAudioNodesForTesting(AudioNodeList());
31 dbus_setter->SetCrasAudioClient(make_scoped_ptr(audio_client_)); 31 dbus_setter->SetCrasAudioClient(make_scoped_ptr(audio_client_));
32 32
33 chromeos::CrasAudioHandler::InitializeForTesting(); 33 chromeos::CrasAudioHandler::InitializeForTesting();
34 audio_handler_ = chromeos::CrasAudioHandler::Get(); 34 audio_handler_ = chromeos::CrasAudioHandler::Get();
35 35
36 controller_.reset(new ShellAudioController()); 36 controller_.reset(new ShellAudioController());
37 } 37 }
38 38
39 virtual ~ShellAudioControllerTest() { 39 ~ShellAudioControllerTest() override {
40 controller_.reset(); 40 controller_.reset();
41 chromeos::CrasAudioHandler::Shutdown(); 41 chromeos::CrasAudioHandler::Shutdown();
42 chromeos::DBusThreadManager::Shutdown(); 42 chromeos::DBusThreadManager::Shutdown();
43 } 43 }
44 44
45 protected: 45 protected:
46 // Fills a AudioNode for use by tests. 46 // Fills a AudioNode for use by tests.
47 AudioNode CreateNode(chromeos::AudioDeviceType type) { 47 AudioNode CreateNode(chromeos::AudioDeviceType type) {
48 AudioNode node; 48 AudioNode node;
49 node.is_input = 49 node.is_input =
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 EXPECT_FALSE(audio_handler_->IsInputMuted()); 128 EXPECT_FALSE(audio_handler_->IsInputMuted());
129 EXPECT_EQ(static_cast<double>( 129 EXPECT_EQ(static_cast<double>(
130 chromeos::AudioDevicesPrefHandler::kDefaultOutputVolumePercent), 130 chromeos::AudioDevicesPrefHandler::kDefaultOutputVolumePercent),
131 audio_handler_->GetOutputVolumePercent()); 131 audio_handler_->GetOutputVolumePercent());
132 132
133 // TODO(rkc): The default value for gain is wrong. http://crbug.com/442489 133 // TODO(rkc): The default value for gain is wrong. http://crbug.com/442489
134 EXPECT_EQ(75.0, audio_handler_->GetInputGainPercent()); 134 EXPECT_EQ(75.0, audio_handler_->GetInputGainPercent());
135 } 135 }
136 136
137 } // namespace extensions 137 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698