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

Side by Side Diff: media/renderers/audio_renderer_impl_unittest.cc

Issue 1786733004: Revert of media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderers/audio_renderer_impl.h" 5 #include "media/renderers/audio_renderer_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 class AudioRendererImplTest : public ::testing::Test { 67 class AudioRendererImplTest : public ::testing::Test {
68 public: 68 public:
69 // Give the decoder some non-garbage media properties. 69 // Give the decoder some non-garbage media properties.
70 AudioRendererImplTest() 70 AudioRendererImplTest()
71 : hardware_config_(AudioParameters(), AudioParameters()), 71 : hardware_config_(AudioParameters(), AudioParameters()),
72 tick_clock_(new base::SimpleTestTickClock()), 72 tick_clock_(new base::SimpleTestTickClock()),
73 demuxer_stream_(DemuxerStream::AUDIO), 73 demuxer_stream_(DemuxerStream::AUDIO),
74 decoder_(new MockAudioDecoder()), 74 decoder_(new MockAudioDecoder()),
75 ended_(false) { 75 ended_(false) {
76 AudioDecoderConfig audio_config(kCodec, kSampleFormat, kChannelLayout, 76 AudioDecoderConfig audio_config(kCodec,
77 kInputSamplesPerSecond, EmptyExtraData(), 77 kSampleFormat,
78 Unencrypted()); 78 kChannelLayout,
79 kInputSamplesPerSecond,
80 EmptyExtraData(),
81 false);
79 demuxer_stream_.set_audio_decoder_config(audio_config); 82 demuxer_stream_.set_audio_decoder_config(audio_config);
80 83
81 // Used to save callbacks and run them at a later time. 84 // Used to save callbacks and run them at a later time.
82 EXPECT_CALL(*decoder_, Decode(_, _)) 85 EXPECT_CALL(*decoder_, Decode(_, _))
83 .WillRepeatedly(Invoke(this, &AudioRendererImplTest::DecodeDecoder)); 86 .WillRepeatedly(Invoke(this, &AudioRendererImplTest::DecodeDecoder));
84 EXPECT_CALL(*decoder_, Reset(_)) 87 EXPECT_CALL(*decoder_, Reset(_))
85 .WillRepeatedly(Invoke(this, &AudioRendererImplTest::ResetDecoder)); 88 .WillRepeatedly(Invoke(this, &AudioRendererImplTest::ResetDecoder));
86 89
87 // Mock out demuxer reads. 90 // Mock out demuxer reads.
88 EXPECT_CALL(demuxer_stream_, Read(_)).WillRepeatedly( 91 EXPECT_CALL(demuxer_stream_, Read(_)).WillRepeatedly(
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 // Advance far enough that we shouldn't be clamped to current time (tested 940 // Advance far enough that we shouldn't be clamped to current time (tested
938 // already above). 941 // already above).
939 tick_clock_->Advance(kOneSecond); 942 tick_clock_->Advance(kOneSecond);
940 EXPECT_EQ( 943 EXPECT_EQ(
941 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value), 944 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value),
942 CurrentMediaWallClockTime(&is_time_moving)); 945 CurrentMediaWallClockTime(&is_time_moving));
943 EXPECT_TRUE(is_time_moving); 946 EXPECT_TRUE(is_time_moving);
944 } 947 }
945 948
946 } // namespace media 949 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/interfaces/media_types.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698