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

Side by Side Diff: webrtc/api/rtpsenderreceiver_unittest.cc

Issue 1921653002: Enable -Winconsistent-missing-override flag. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 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 | « webrtc/api/rtpsender.h ('k') | webrtc/api/statscollector_unittest.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 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 25 matching lines...) Expand all
36 static const uint32_t kVideoSsrc = 98; 36 static const uint32_t kVideoSsrc = 98;
37 static const uint32_t kVideoSsrc2 = 100; 37 static const uint32_t kVideoSsrc2 = 100;
38 static const uint32_t kAudioSsrc = 99; 38 static const uint32_t kAudioSsrc = 99;
39 static const uint32_t kAudioSsrc2 = 101; 39 static const uint32_t kAudioSsrc2 = 101;
40 40
41 namespace webrtc { 41 namespace webrtc {
42 42
43 // Helper class to test RtpSender/RtpReceiver. 43 // Helper class to test RtpSender/RtpReceiver.
44 class MockAudioProvider : public AudioProviderInterface { 44 class MockAudioProvider : public AudioProviderInterface {
45 public: 45 public:
46 ~MockAudioProvider() override {} 46 // TODO(nisse): Valid overrides commented out, because the gmock
47 // methods don't use any override declarations, and we want to avoid
48 // warnings from -Winconsistent-missing-override. See
49 // http://crbug.com/428099.
50 ~MockAudioProvider() /* override */ {}
47 51
48 MOCK_METHOD2(SetAudioPlayout, 52 MOCK_METHOD2(SetAudioPlayout,
49 void(uint32_t ssrc, 53 void(uint32_t ssrc,
50 bool enable)); 54 bool enable));
51 MOCK_METHOD4(SetAudioSend, 55 MOCK_METHOD4(SetAudioSend,
52 void(uint32_t ssrc, 56 void(uint32_t ssrc,
53 bool enable, 57 bool enable,
54 const cricket::AudioOptions& options, 58 const cricket::AudioOptions& options,
55 cricket::AudioSource* source)); 59 cricket::AudioSource* source));
56 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume)); 60 MOCK_METHOD2(SetAudioPlayoutVolume, void(uint32_t ssrc, double volume));
57 MOCK_CONST_METHOD1(GetAudioRtpParameters, RtpParameters(uint32_t ssrc)); 61 MOCK_CONST_METHOD1(GetAudioRtpParameters, RtpParameters(uint32_t ssrc));
58 MOCK_METHOD2(SetAudioRtpParameters, 62 MOCK_METHOD2(SetAudioRtpParameters,
59 bool(uint32_t ssrc, const RtpParameters&)); 63 bool(uint32_t ssrc, const RtpParameters&));
60 64
61 void SetRawAudioSink(uint32_t, 65 void SetRawAudioSink(
62 std::unique_ptr<AudioSinkInterface> sink) override { 66 uint32_t, std::unique_ptr<AudioSinkInterface> sink) /* override */ {
63 sink_ = std::move(sink); 67 sink_ = std::move(sink);
64 } 68 }
65 69
66 private: 70 private:
67 std::unique_ptr<AudioSinkInterface> sink_; 71 std::unique_ptr<AudioSinkInterface> sink_;
68 }; 72 };
69 73
70 // Helper class to test RtpSender/RtpReceiver. 74 // Helper class to test RtpSender/RtpReceiver.
71 class MockVideoProvider : public VideoProviderInterface { 75 class MockVideoProvider : public VideoProviderInterface {
72 public: 76 public:
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 .WillOnce(Return(RtpParameters())); 502 .WillOnce(Return(RtpParameters()));
499 EXPECT_CALL(video_provider_, SetVideoRtpParameters(kVideoSsrc, _)) 503 EXPECT_CALL(video_provider_, SetVideoRtpParameters(kVideoSsrc, _))
500 .WillOnce(Return(true)); 504 .WillOnce(Return(true));
501 RtpParameters params = video_rtp_sender_->GetParameters(); 505 RtpParameters params = video_rtp_sender_->GetParameters();
502 EXPECT_TRUE(video_rtp_sender_->SetParameters(params)); 506 EXPECT_TRUE(video_rtp_sender_->SetParameters(params));
503 507
504 DestroyVideoRtpSender(); 508 DestroyVideoRtpSender();
505 } 509 }
506 510
507 } // namespace webrtc 511 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/rtpsender.h ('k') | webrtc/api/statscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698