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

Side by Side Diff: remoting/client/audio_player_unittest.cc

Issue 667123002: Standardize usage of virtual/override/final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « remoting/client/audio_decode_scheduler.h ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "remoting/client/audio_player.h" 5 #include "remoting/client/audio_player.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 } // namespace 23 } // namespace
24 24
25 namespace remoting { 25 namespace remoting {
26 26
27 class FakeAudioPlayer : public AudioPlayer { 27 class FakeAudioPlayer : public AudioPlayer {
28 public: 28 public:
29 FakeAudioPlayer() { 29 FakeAudioPlayer() {
30 } 30 }
31 31
32 virtual bool ResetAudioPlayer(AudioPacket::SamplingRate) override { 32 bool ResetAudioPlayer(AudioPacket::SamplingRate) override { return true; }
33 return true;
34 }
35 33
36 virtual uint32 GetSamplesPerFrame() override { 34 uint32 GetSamplesPerFrame() override { return kAudioSamplesPerFrame; }
37 return kAudioSamplesPerFrame;
38 }
39 }; 35 };
40 36
41 class AudioPlayerTest : public ::testing::Test { 37 class AudioPlayerTest : public ::testing::Test {
42 protected: 38 protected:
43 virtual void SetUp() { 39 virtual void SetUp() {
44 audio_.reset(new FakeAudioPlayer()); 40 audio_.reset(new FakeAudioPlayer());
45 buffer_.reset(new char[kAudioFrameBytes + kPaddingBytes]); 41 buffer_.reset(new char[kAudioFrameBytes + kPaddingBytes]);
46 } 42 }
47 43
48 virtual void TearDown() { 44 virtual void TearDown() {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 302
307 // Attempt to consume a frame of 25 samples. 303 // Attempt to consume a frame of 25 samples.
308 ConsumeAudioFrame(); 304 ConsumeAudioFrame();
309 ASSERT_EQ(0, GetNumQueuedSamples()); 305 ASSERT_EQ(0, GetNumQueuedSamples());
310 ASSERT_EQ(0, GetNumQueuedPackets()); 306 ASSERT_EQ(0, GetNumQueuedPackets());
311 ASSERT_EQ(0, GetBytesConsumed()); 307 ASSERT_EQ(0, GetBytesConsumed());
312 CheckAudioFrameBytes(packet1_samples * kAudioSampleBytes); 308 CheckAudioFrameBytes(packet1_samples * kAudioSampleBytes);
313 } 309 }
314 310
315 } // namespace remoting 311 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/audio_decode_scheduler.h ('k') | remoting/client/chromoting_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698