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

Side by Side Diff: media/cast/transport/pacing/paced_sender_unittest.cc

Issue 210303003: Cast: Remove LoggingStats in favor of event subscribers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/big_endian.h" 5 #include "base/big_endian.h"
6 #include "base/test/simple_test_tick_clock.h" 6 #include "base/test/simple_test_tick_clock.h"
7 #include "media/cast/logging/simple_event_subscriber.h" 7 #include "media/cast/logging/simple_event_subscriber.h"
8 #include "media/cast/test/fake_single_thread_task_runner.h" 8 #include "media/cast/test/fake_single_thread_task_runner.h"
9 #include "media/cast/transport/pacing/paced_sender.h" 9 #include "media/cast/transport/pacing/paced_sender.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 public: 46 public:
47 std::list<int> expected_packet_size_; 47 std::list<int> expected_packet_size_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(TestPacketSender); 49 DISALLOW_COPY_AND_ASSIGN(TestPacketSender);
50 }; 50 };
51 51
52 class PacedSenderTest : public ::testing::Test { 52 class PacedSenderTest : public ::testing::Test {
53 protected: 53 protected:
54 PacedSenderTest() : logging_(GetLoggingConfigWithRawEventsAndStatsEnabled()) { 54 PacedSenderTest() {
55 logging_.AddRawEventSubscriber(&subscriber_); 55 logging_.AddRawEventSubscriber(&subscriber_);
56 testing_clock_.Advance( 56 testing_clock_.Advance(
57 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 57 base::TimeDelta::FromMilliseconds(kStartMillisecond));
58 task_runner_ = new test::FakeSingleThreadTaskRunner(&testing_clock_); 58 task_runner_ = new test::FakeSingleThreadTaskRunner(&testing_clock_);
59 paced_sender_.reset(new PacedSender( 59 paced_sender_.reset(new PacedSender(
60 &testing_clock_, &logging_, &mock_transport_, task_runner_)); 60 &testing_clock_, &logging_, &mock_transport_, task_runner_));
61 paced_sender_->RegisterAudioSsrc(kAudioSsrc); 61 paced_sender_->RegisterAudioSsrc(kAudioSsrc);
62 paced_sender_->RegisterVideoSsrc(kVideoSsrc); 62 paced_sender_->RegisterVideoSsrc(kVideoSsrc);
63 } 63 }
64 64
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 testing_clock_.Advance(timeout_10ms); 325 testing_clock_.Advance(timeout_10ms);
326 task_runner_->RunTasks(); 326 task_runner_->RunTasks();
327 327
328 // No more packets. 328 // No more packets.
329 EXPECT_TRUE(RunUntilEmpty(5)); 329 EXPECT_TRUE(RunUntilEmpty(5));
330 } 330 }
331 331
332 } // namespace transport 332 } // namespace transport
333 } // namespace cast 333 } // namespace cast
334 } // namespace media 334 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698