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

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

Issue 1423163004: media: Replace DecryptorReadyCB with CdmReadyCB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 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/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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback_helpers.h" 6 #include "base/callback_helpers.h"
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/test/simple_test_tick_clock.h" 10 #include "base/test/simple_test_tick_clock.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 last_statistics_.audio_memory_usage += stats.audio_memory_usage; 117 last_statistics_.audio_memory_usage += stats.audio_memory_usage;
118 } 118 }
119 119
120 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); 120 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState));
121 MOCK_METHOD1(OnError, void(PipelineStatus)); 121 MOCK_METHOD1(OnError, void(PipelineStatus));
122 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); 122 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void));
123 123
124 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) { 124 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) {
125 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); 125 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0);
126 renderer_->Initialize( 126 renderer_->Initialize(
127 &demuxer_stream_, pipeline_status_cb, SetDecryptorReadyCB(), 127 &demuxer_stream_, pipeline_status_cb, SetCdmReadyCB(),
128 base::Bind(&AudioRendererImplTest::OnStatistics, 128 base::Bind(&AudioRendererImplTest::OnStatistics,
129 base::Unretained(this)), 129 base::Unretained(this)),
130 base::Bind(&AudioRendererImplTest::OnBufferingStateChange, 130 base::Bind(&AudioRendererImplTest::OnBufferingStateChange,
131 base::Unretained(this)), 131 base::Unretained(this)),
132 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)), 132 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)),
133 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)), 133 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)),
134 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey, 134 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey,
135 base::Unretained(this))); 135 base::Unretained(this)));
136 } 136 }
137 137
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 // Advance far enough that we shouldn't be clamped to current time (tested 882 // Advance far enough that we shouldn't be clamped to current time (tested
883 // already above). 883 // already above).
884 tick_clock_->Advance(kOneSecond); 884 tick_clock_->Advance(kOneSecond);
885 EXPECT_EQ( 885 EXPECT_EQ(
886 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value), 886 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value),
887 CurrentMediaWallClockTime(&is_time_moving)); 887 CurrentMediaWallClockTime(&is_time_moving));
888 EXPECT_TRUE(is_time_moving); 888 EXPECT_TRUE(is_time_moving);
889 } 889 }
890 890
891 } // namespace media 891 } // 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