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

Side by Side Diff: media/cast/logging/receiver_time_offset_estimator_impl_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/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
8 #include "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
9 #include "media/cast/cast_environment.h" 9 #include "media/cast/cast_environment.h"
10 #include "media/cast/logging/logging_defines.h" 10 #include "media/cast/logging/logging_defines.h"
(...skipping 10 matching lines...) Expand all
21 : sender_clock_(new base::SimpleTestTickClock()), 21 : sender_clock_(new base::SimpleTestTickClock()),
22 task_runner_(new test::FakeSingleThreadTaskRunner(sender_clock_)), 22 task_runner_(new test::FakeSingleThreadTaskRunner(sender_clock_)),
23 cast_environment_(new CastEnvironment( 23 cast_environment_(new CastEnvironment(
24 scoped_ptr<base::TickClock>(sender_clock_).Pass(), 24 scoped_ptr<base::TickClock>(sender_clock_).Pass(),
25 task_runner_, 25 task_runner_,
26 task_runner_, 26 task_runner_,
27 task_runner_)) { 27 task_runner_)) {
28 cast_environment_->Logging()->AddRawEventSubscriber(&estimator_); 28 cast_environment_->Logging()->AddRawEventSubscriber(&estimator_);
29 } 29 }
30 30
31 virtual ~ReceiverTimeOffsetEstimatorImplTest() { 31 ~ReceiverTimeOffsetEstimatorImplTest() override {
32 cast_environment_->Logging()->RemoveRawEventSubscriber(&estimator_); 32 cast_environment_->Logging()->RemoveRawEventSubscriber(&estimator_);
33 } 33 }
34 34
35 void AdvanceClocks(base::TimeDelta time) { 35 void AdvanceClocks(base::TimeDelta time) {
36 sender_clock_->Advance(time); 36 sender_clock_->Advance(time);
37 receiver_clock_.Advance(time); 37 receiver_clock_.Advance(time);
38 } 38 }
39 39
40 base::SimpleTestTickClock* sender_clock_; // Owned by CastEnvironment. 40 base::SimpleTestTickClock* sender_clock_; // Owned by CastEnvironment.
41 scoped_refptr<test::FakeSingleThreadTaskRunner> task_runner_; 41 scoped_refptr<test::FakeSingleThreadTaskRunner> task_runner_;
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 int64 lower_bound_ms = lower_bound.InMilliseconds(); 298 int64 lower_bound_ms = lower_bound.InMilliseconds();
299 int64 upper_bound_ms = upper_bound.InMilliseconds(); 299 int64 upper_bound_ms = upper_bound.InMilliseconds();
300 EXPECT_GT(lower_bound_ms, 90); 300 EXPECT_GT(lower_bound_ms, 90);
301 EXPECT_LE(lower_bound_ms, true_offset_ms); 301 EXPECT_LE(lower_bound_ms, true_offset_ms);
302 EXPECT_LT(upper_bound_ms, 150); 302 EXPECT_LT(upper_bound_ms, 150);
303 EXPECT_GT(upper_bound_ms, true_offset_ms); 303 EXPECT_GT(upper_bound_ms, true_offset_ms);
304 } 304 }
305 305
306 } // namespace cast 306 } // namespace cast
307 } // namespace media 307 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/logging_raw_unittest.cc ('k') | media/cast/logging/serialize_deserialize_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698