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

Side by Side Diff: media/filters/audio_clock_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
« no previous file with comments | « media/ffmpeg/ffmpeg_common_unittest.cc ('k') | media/filters/audio_file_reader_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/base/audio_timestamp_helper.h" 5 #include "media/base/audio_timestamp_helper.h"
6 #include "media/base/buffers.h" 6 #include "media/base/buffers.h"
7 #include "media/filters/audio_clock.h" 7 #include "media/filters/audio_clock.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace media { 10 namespace media {
11 11
12 class AudioClockTest : public testing::Test { 12 class AudioClockTest : public testing::Test {
13 public: 13 public:
14 AudioClockTest() 14 AudioClockTest()
15 : sample_rate_(10), clock_(base::TimeDelta(), sample_rate_) {} 15 : sample_rate_(10), clock_(base::TimeDelta(), sample_rate_) {}
16 16
17 virtual ~AudioClockTest() {} 17 ~AudioClockTest() override {}
18 18
19 void WroteAudio(int frames_written, 19 void WroteAudio(int frames_written,
20 int frames_requested, 20 int frames_requested,
21 int delay_frames, 21 int delay_frames,
22 float playback_rate) { 22 float playback_rate) {
23 clock_.WroteAudio( 23 clock_.WroteAudio(
24 frames_written, frames_requested, delay_frames, playback_rate); 24 frames_written, frames_requested, delay_frames, playback_rate);
25 } 25 }
26 26
27 int FrontTimestampInDays() { return clock_.front_timestamp().InDays(); } 27 int FrontTimestampInDays() { return clock_.front_timestamp().InDays(); }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 EXPECT_EQ(huge.InDays(), ContiguousAudioDataBufferedInDays()); 378 EXPECT_EQ(huge.InDays(), ContiguousAudioDataBufferedInDays());
379 379
380 // Use huge delay to test calculation of buffered data. 380 // Use huge delay to test calculation of buffered data.
381 WroteAudio( 381 WroteAudio(
382 huge_amount_of_frames, huge_amount_of_frames, huge_amount_of_frames, 1.0); 382 huge_amount_of_frames, huge_amount_of_frames, huge_amount_of_frames, 1.0);
383 EXPECT_EQ((huge * 3).InDays(), FrontTimestampInDays()); 383 EXPECT_EQ((huge * 3).InDays(), FrontTimestampInDays());
384 EXPECT_EQ((huge * 2).InDays(), ContiguousAudioDataBufferedInDays()); 384 EXPECT_EQ((huge * 2).InDays(), ContiguousAudioDataBufferedInDays());
385 } 385 }
386 386
387 } // namespace media 387 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common_unittest.cc ('k') | media/filters/audio_file_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698