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

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

Issue 12207034: Linux/ChromeOS Chromium style checker cleanup, remoting/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « remoting/base/resources_unittest.cc ('k') | remoting/client/plugin/pepper_entrypoints.cc » ('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 bool ResetAudioPlayer(AudioPacket::SamplingRate) OVERRIDE { 32 virtual bool ResetAudioPlayer(AudioPacket::SamplingRate) OVERRIDE {
33 return true; 33 return true;
34 } 34 }
35 35
36 uint32 GetSamplesPerFrame() OVERRIDE { 36 virtual uint32 GetSamplesPerFrame() OVERRIDE {
37 return kAudioSamplesPerFrame; 37 return kAudioSamplesPerFrame;
38 } 38 }
39 }; 39 };
40 40
41 class AudioPlayerTest : public ::testing::Test { 41 class AudioPlayerTest : public ::testing::Test {
42 protected: 42 protected:
43 virtual void SetUp() { 43 virtual void SetUp() {
44 audio_.reset(new FakeAudioPlayer()); 44 audio_.reset(new FakeAudioPlayer());
45 buffer_.reset(new char[kAudioFrameBytes + kPaddingBytes]); 45 buffer_.reset(new char[kAudioFrameBytes + kPaddingBytes]);
46 } 46 }
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 // Attempt to consume a frame of 25 samples. 319 // Attempt to consume a frame of 25 samples.
320 ConsumeAudioFrame(); 320 ConsumeAudioFrame();
321 ASSERT_EQ(0, GetNumQueuedSamples()); 321 ASSERT_EQ(0, GetNumQueuedSamples());
322 ASSERT_EQ(0, GetNumQueuedPackets()); 322 ASSERT_EQ(0, GetNumQueuedPackets());
323 ASSERT_EQ(0, GetBytesConsumed()); 323 ASSERT_EQ(0, GetBytesConsumed());
324 CheckAudioFrameBytes(packet1_samples * kAudioSampleBytes); 324 CheckAudioFrameBytes(packet1_samples * kAudioSampleBytes);
325 } 325 }
326 326
327 } // namespace remoting 327 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/resources_unittest.cc ('k') | remoting/client/plugin/pepper_entrypoints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698