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

Side by Side Diff: media/base/wall_clock_time_source_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/test/simple_test_tick_clock.h" 5 #include "base/test/simple_test_tick_clock.h"
6 #include "media/base/wall_clock_time_source.h" 6 #include "media/base/wall_clock_time_source.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 class WallClockTimeSourceTest : public testing::Test { 11 class WallClockTimeSourceTest : public testing::Test {
12 public: 12 public:
13 WallClockTimeSourceTest() : tick_clock_(new base::SimpleTestTickClock()) { 13 WallClockTimeSourceTest() : tick_clock_(new base::SimpleTestTickClock()) {
14 time_source_.SetTickClockForTesting( 14 time_source_.SetTickClockForTesting(
15 scoped_ptr<base::TickClock>(tick_clock_)); 15 scoped_ptr<base::TickClock>(tick_clock_));
16 } 16 }
17 virtual ~WallClockTimeSourceTest() {} 17 ~WallClockTimeSourceTest() override {}
18 18
19 void AdvanceTimeInSeconds(int seconds) { 19 void AdvanceTimeInSeconds(int seconds) {
20 tick_clock_->Advance(base::TimeDelta::FromSeconds(seconds)); 20 tick_clock_->Advance(base::TimeDelta::FromSeconds(seconds));
21 } 21 }
22 22
23 int CurrentMediaTimeInSeconds() { 23 int CurrentMediaTimeInSeconds() {
24 return time_source_.CurrentMediaTime().InSeconds(); 24 return time_source_.CurrentMediaTime().InSeconds();
25 } 25 }
26 26
27 void SetMediaTimeInSeconds(int seconds) { 27 void SetMediaTimeInSeconds(int seconds) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 AdvanceTimeInSeconds(10); 81 AdvanceTimeInSeconds(10);
82 EXPECT_EQ(10, CurrentMediaTimeInSeconds()); 82 EXPECT_EQ(10, CurrentMediaTimeInSeconds());
83 83
84 time_source_.StopTicking(); 84 time_source_.StopTicking();
85 85
86 AdvanceTimeInSeconds(10); 86 AdvanceTimeInSeconds(10);
87 EXPECT_EQ(10, CurrentMediaTimeInSeconds()); 87 EXPECT_EQ(10, CurrentMediaTimeInSeconds());
88 } 88 }
89 89
90 } // namespace media 90 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_util_unittest.cc ('k') | media/cast/logging/encoding_event_subscriber_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698