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

Side by Side Diff: media/cast/logging/stats_event_subscriber_unittest.cc

Issue 661163004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/rand_util.h" 7 #include "base/rand_util.h"
8 #include "base/test/simple_test_tick_clock.h" 8 #include "base/test/simple_test_tick_clock.h"
9 #include "base/time/tick_clock.h" 9 #include "base/time/tick_clock.h"
10 #include "media/cast/cast_environment.h" 10 #include "media/cast/cast_environment.h"
(...skipping 20 matching lines...) Expand all
31 task_runner_, 31 task_runner_,
32 task_runner_, 32 task_runner_,
33 task_runner_)), 33 task_runner_)),
34 fake_offset_estimator_( 34 fake_offset_estimator_(
35 base::TimeDelta::FromSeconds(kReceiverOffsetSecs)) { 35 base::TimeDelta::FromSeconds(kReceiverOffsetSecs)) {
36 receiver_clock_.Advance(base::TimeDelta::FromSeconds(kReceiverOffsetSecs)); 36 receiver_clock_.Advance(base::TimeDelta::FromSeconds(kReceiverOffsetSecs));
37 cast_environment_->Logging()->AddRawEventSubscriber( 37 cast_environment_->Logging()->AddRawEventSubscriber(
38 &fake_offset_estimator_); 38 &fake_offset_estimator_);
39 } 39 }
40 40
41 virtual ~StatsEventSubscriberTest() { 41 ~StatsEventSubscriberTest() override {
42 if (subscriber_.get()) 42 if (subscriber_.get())
43 cast_environment_->Logging()->RemoveRawEventSubscriber(subscriber_.get()); 43 cast_environment_->Logging()->RemoveRawEventSubscriber(subscriber_.get());
44 cast_environment_->Logging()->RemoveRawEventSubscriber( 44 cast_environment_->Logging()->RemoveRawEventSubscriber(
45 &fake_offset_estimator_); 45 &fake_offset_estimator_);
46 } 46 }
47 47
48 void AdvanceClocks(base::TimeDelta delta) { 48 void AdvanceClocks(base::TimeDelta delta) {
49 sender_clock_->Advance(delta); 49 sender_clock_->Advance(delta);
50 receiver_clock_.Advance(delta); 50 receiver_clock_.Advance(delta);
51 } 51 }
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 EXPECT_DOUBLE_EQ(it->second, static_cast<double>(num_packets_retransmitted)); 477 EXPECT_DOUBLE_EQ(it->second, static_cast<double>(num_packets_retransmitted));
478 478
479 it = stats_map.find(StatsEventSubscriber::NUM_PACKETS_RTX_REJECTED); 479 it = stats_map.find(StatsEventSubscriber::NUM_PACKETS_RTX_REJECTED);
480 ASSERT_TRUE(it != stats_map.end()); 480 ASSERT_TRUE(it != stats_map.end());
481 481
482 EXPECT_DOUBLE_EQ(it->second, static_cast<double>(num_packets_rtx_rejected)); 482 EXPECT_DOUBLE_EQ(it->second, static_cast<double>(num_packets_rtx_rejected));
483 } 483 }
484 484
485 } // namespace cast 485 } // namespace cast
486 } // namespace media 486 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/simple_event_subscriber_unittest.cc ('k') | media/cast/net/cast_transport_sender_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698