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: components/copresence/handlers/audio/audio_directive_handler_unittest.cc

Issue 623133002: replace OVERRIDE and FINAL with override and final in components/ (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
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 "components/copresence/handlers/audio/audio_directive_handler.h" 5 #include "components/copresence/handlers/audio/audio_directive_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "components/copresence/mediums/audio/audio_player.h" 9 #include "components/copresence/mediums/audio/audio_player.h"
10 #include "components/copresence/mediums/audio/audio_recorder.h" 10 #include "components/copresence/mediums/audio/audio_recorder.h"
11 #include "components/copresence/test/audio_test_support.h" 11 #include "components/copresence/test/audio_test_support.h"
12 #include "media/base/audio_bus.h" 12 #include "media/base/audio_bus.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 using ::testing::_; 16 using ::testing::_;
17 using ::testing::Le; 17 using ::testing::Le;
18 18
19 namespace copresence { 19 namespace copresence {
20 20
21 class TestAudioPlayer : public AudioPlayer { 21 class TestAudioPlayer : public AudioPlayer {
22 public: 22 public:
23 TestAudioPlayer() {} 23 TestAudioPlayer() {}
24 virtual ~TestAudioPlayer() {} 24 virtual ~TestAudioPlayer() {}
25 25
26 // AudioPlayer overrides: 26 // AudioPlayer overrides:
27 virtual void Initialize() OVERRIDE {} 27 virtual void Initialize() override {}
28 virtual void Play( 28 virtual void Play(
29 const scoped_refptr<media::AudioBusRefCounted>& /* samples */) OVERRIDE { 29 const scoped_refptr<media::AudioBusRefCounted>& /* samples */) override {
30 set_is_playing(true); 30 set_is_playing(true);
31 } 31 }
32 virtual void Stop() OVERRIDE { set_is_playing(false); } 32 virtual void Stop() override { set_is_playing(false); }
33 virtual void Finalize() OVERRIDE { delete this; } 33 virtual void Finalize() override { delete this; }
34 34
35 private: 35 private:
36 DISALLOW_COPY_AND_ASSIGN(TestAudioPlayer); 36 DISALLOW_COPY_AND_ASSIGN(TestAudioPlayer);
37 }; 37 };
38 38
39 class TestAudioRecorder : public AudioRecorder { 39 class TestAudioRecorder : public AudioRecorder {
40 public: 40 public:
41 TestAudioRecorder() : AudioRecorder(AudioRecorder::DecodeSamplesCallback()) {} 41 TestAudioRecorder() : AudioRecorder(AudioRecorder::DecodeSamplesCallback()) {}
42 virtual ~TestAudioRecorder() {} 42 virtual ~TestAudioRecorder() {}
43 43
44 // AudioRecorder overrides: 44 // AudioRecorder overrides:
45 virtual void Initialize() OVERRIDE {} 45 virtual void Initialize() override {}
46 virtual void Record() OVERRIDE { set_is_recording(true); } 46 virtual void Record() override { set_is_recording(true); }
47 virtual void Stop() OVERRIDE { set_is_recording(false); } 47 virtual void Stop() override { set_is_recording(false); }
48 virtual void Finalize() OVERRIDE { delete this; } 48 virtual void Finalize() override { delete this; }
49 49
50 private: 50 private:
51 DISALLOW_COPY_AND_ASSIGN(TestAudioRecorder); 51 DISALLOW_COPY_AND_ASSIGN(TestAudioRecorder);
52 }; 52 };
53 53
54 class AudioDirectiveHandlerTest : public testing::Test { 54 class AudioDirectiveHandlerTest : public testing::Test {
55 public: 55 public:
56 AudioDirectiveHandlerTest() 56 AudioDirectiveHandlerTest()
57 : directive_handler_(new AudioDirectiveHandler( 57 : directive_handler_(new AudioDirectiveHandler(
58 AudioRecorder::DecodeSamplesCallback(), 58 AudioRecorder::DecodeSamplesCallback(),
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 EXPECT_EQ(true, directive_handler_->recorder_->IsRecording()); 130 EXPECT_EQ(true, directive_handler_->recorder_->IsRecording());
131 131
132 directive_handler_->RemoveInstructions("op_id3"); 132 directive_handler_->RemoveInstructions("op_id3");
133 EXPECT_FALSE(directive_handler_->recorder_->IsRecording()); 133 EXPECT_FALSE(directive_handler_->recorder_->IsRecording());
134 } 134 }
135 135
136 // TODO(rkc): Write more tests that check more convoluted sequences of 136 // TODO(rkc): Write more tests that check more convoluted sequences of
137 // transmits/receives. 137 // transmits/receives.
138 138
139 } // namespace copresence 139 } // namespace copresence
OLDNEW
« no previous file with comments | « components/copresence/copresence_manager_impl.h ('k') | components/copresence/mediums/audio/audio_player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698