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

Side by Side Diff: media/cast/sender/audio_sender_unittest.cc

Issue 1141703002: Chromium changes for static linking ffmpeg (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Roll DEPS to fix cros, rebase. Created 5 years, 6 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 private: 60 private:
61 int number_of_rtp_packets_; 61 int number_of_rtp_packets_;
62 int number_of_rtcp_packets_; 62 int number_of_rtcp_packets_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(TestPacketSender); 64 DISALLOW_COPY_AND_ASSIGN(TestPacketSender);
65 }; 65 };
66 66
67 class AudioSenderTest : public ::testing::Test { 67 class AudioSenderTest : public ::testing::Test {
68 protected: 68 protected:
69 AudioSenderTest() { 69 AudioSenderTest() {
70 InitializeMediaLibraryForTesting(); 70 InitializeMediaLibrary();
71 testing_clock_ = new base::SimpleTestTickClock(); 71 testing_clock_ = new base::SimpleTestTickClock();
72 testing_clock_->Advance(base::TimeTicks::Now() - base::TimeTicks()); 72 testing_clock_->Advance(base::TimeTicks::Now() - base::TimeTicks());
73 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_); 73 task_runner_ = new test::FakeSingleThreadTaskRunner(testing_clock_);
74 cast_environment_ = 74 cast_environment_ =
75 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(), 75 new CastEnvironment(scoped_ptr<base::TickClock>(testing_clock_).Pass(),
76 task_runner_, 76 task_runner_,
77 task_runner_, 77 task_runner_,
78 task_runner_); 78 task_runner_);
79 audio_config_.codec = CODEC_AUDIO_OPUS; 79 audio_config_.codec = CODEC_AUDIO_OPUS;
80 audio_config_.use_external_encoder = false; 80 audio_config_.use_external_encoder = false;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 base::TimeDelta max_rtcp_timeout = 151 base::TimeDelta max_rtcp_timeout =
152 base::TimeDelta::FromMilliseconds(1 + kDefaultRtcpIntervalMs * 3 / 2); 152 base::TimeDelta::FromMilliseconds(1 + kDefaultRtcpIntervalMs * 3 / 2);
153 testing_clock_->Advance(max_rtcp_timeout); 153 testing_clock_->Advance(max_rtcp_timeout);
154 task_runner_->RunTasks(); 154 task_runner_->RunTasks();
155 EXPECT_LE(1, transport_.number_of_rtp_packets()); 155 EXPECT_LE(1, transport_.number_of_rtp_packets());
156 EXPECT_LE(1, transport_.number_of_rtcp_packets()); 156 EXPECT_LE(1, transport_.number_of_rtcp_packets());
157 } 157 }
158 158
159 } // namespace cast 159 } // namespace cast
160 } // namespace media 160 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/audio_encoder_unittest.cc ('k') | media/cast/sender/h264_vt_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698