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

Side by Side Diff: media/filters/audio_decoder_selector_unittest.cc

Issue 692323002: Move Liveness from DemuxerStreamProvider to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mojo 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/base/video_renderer.h ('k') | media/filters/audio_renderer_impl.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 (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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "media/base/gmock_callback_support.h" 9 #include "media/base/gmock_callback_support.h"
10 #include "media/base/mock_filters.h" 10 #include "media/base/mock_filters.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 decoder_selector_.reset(new AudioDecoderSelector( 130 decoder_selector_.reset(new AudioDecoderSelector(
131 message_loop_.message_loop_proxy(), 131 message_loop_.message_loop_proxy(),
132 all_decoders_.Pass(), 132 all_decoders_.Pass(),
133 set_decryptor_ready_cb)); 133 set_decryptor_ready_cb));
134 } 134 }
135 135
136 void SelectDecoder() { 136 void SelectDecoder() {
137 decoder_selector_->SelectDecoder( 137 decoder_selector_->SelectDecoder(
138 demuxer_stream_.get(), 138 demuxer_stream_.get(),
139 false,
140 base::Bind(&AudioDecoderSelectorTest::MockOnDecoderSelected, 139 base::Bind(&AudioDecoderSelectorTest::MockOnDecoderSelected,
141 base::Unretained(this)), 140 base::Unretained(this)),
142 base::Bind(&AudioDecoderSelectorTest::OnDecoderOutput)); 141 base::Bind(&AudioDecoderSelectorTest::OnDecoderOutput));
143 message_loop_.RunUntilIdle(); 142 message_loop_.RunUntilIdle();
144 } 143 }
145 144
146 void SelectDecoderAndDestroy() { 145 void SelectDecoderAndDestroy() {
147 SelectDecoder(); 146 SelectDecoder();
148 147
149 EXPECT_CALL(*this, OnDecoderSelected(IsNull(), IsNull())); 148 EXPECT_CALL(*this, OnDecoderSelected(IsNull(), IsNull()));
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 354 }
356 355
357 TEST_F(AudioDecoderSelectorTest, Destroy_EncryptedStream_DecryptAndDecode) { 356 TEST_F(AudioDecoderSelectorTest, Destroy_EncryptedStream_DecryptAndDecode) {
358 UseEncryptedStream(); 357 UseEncryptedStream();
359 InitializeDecoderSelector(kHoldSetDecryptor, 1); 358 InitializeDecoderSelector(kHoldSetDecryptor, 1);
360 359
361 SelectDecoderAndDestroy(); 360 SelectDecoderAndDestroy();
362 } 361 }
363 362
364 } // namespace media 363 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_renderer.h ('k') | media/filters/audio_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698