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

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

Issue 1666653002: media: Remove SetCdmReadyCB and CdmReadyCB (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix compile errors Created 4 years, 10 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/renderers/audio_renderer_impl.cc ('k') | media/renderers/renderer_impl.h » ('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 (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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 last_statistics_.audio_memory_usage += stats.audio_memory_usage; 119 last_statistics_.audio_memory_usage += stats.audio_memory_usage;
120 } 120 }
121 121
122 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); 122 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState));
123 MOCK_METHOD1(OnError, void(PipelineStatus)); 123 MOCK_METHOD1(OnError, void(PipelineStatus));
124 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); 124 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
125 125
126 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) { 126 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) {
127 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); 127 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0);
128 renderer_->Initialize( 128 renderer_->Initialize(
129 &demuxer_stream_, pipeline_status_cb, SetCdmReadyCB(), 129 &demuxer_stream_, pipeline_status_cb, nullptr,
130 base::Bind(&AudioRendererImplTest::OnStatistics, 130 base::Bind(&AudioRendererImplTest::OnStatistics,
131 base::Unretained(this)), 131 base::Unretained(this)),
132 base::Bind(&AudioRendererImplTest::OnBufferingStateChange, 132 base::Bind(&AudioRendererImplTest::OnBufferingStateChange,
133 base::Unretained(this)), 133 base::Unretained(this)),
134 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)), 134 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)),
135 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)), 135 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)),
136 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey, 136 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey,
137 base::Unretained(this))); 137 base::Unretained(this)));
138 } 138 }
139 139
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 // Advance far enough that we shouldn't be clamped to current time (tested 885 // Advance far enough that we shouldn't be clamped to current time (tested
886 // already above). 886 // already above).
887 tick_clock_->Advance(kOneSecond); 887 tick_clock_->Advance(kOneSecond);
888 EXPECT_EQ( 888 EXPECT_EQ(
889 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value), 889 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value),
890 CurrentMediaWallClockTime(&is_time_moving)); 890 CurrentMediaWallClockTime(&is_time_moving));
891 EXPECT_TRUE(is_time_moving); 891 EXPECT_TRUE(is_time_moving);
892 } 892 }
893 893
894 } // namespace media 894 } // namespace media
OLDNEW
« no previous file with comments | « media/renderers/audio_renderer_impl.cc ('k') | media/renderers/renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698