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

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

Issue 11226019: Encrypted Media: Replace DecryptorClient with key event callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add spec link Created 8 years 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
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.h" 8 #include "base/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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 base::Unretained(this))); 122 base::Unretained(this)));
123 message_loop_.RunUntilIdle(); 123 message_loop_.RunUntilIdle();
124 } 124 }
125 125
126 // Fixture members. 126 // Fixture members.
127 scoped_ptr<VideoDecoderSelector> decoder_selector_; 127 scoped_ptr<VideoDecoderSelector> decoder_selector_;
128 VideoDecoderConfig clear_video_config_; 128 VideoDecoderConfig clear_video_config_;
129 VideoDecoderConfig encrypted_video_config_; 129 VideoDecoderConfig encrypted_video_config_;
130 scoped_refptr<StrictMock<MockDemuxerStream> > demuxer_stream_; 130 scoped_refptr<StrictMock<MockDemuxerStream> > demuxer_stream_;
131 // Use NiceMock since we don't care about most of calls on the decryptor, e.g. 131 // Use NiceMock since we don't care about most of calls on the decryptor, e.g.
132 // RegisterKeyAddedCB(). 132 // RegisterNewKeyCB().
133 scoped_ptr<NiceMock<MockDecryptor> > decryptor_; 133 scoped_ptr<NiceMock<MockDecryptor> > decryptor_;
134 scoped_refptr<StrictMock<MockVideoDecoder> > decoder_1_; 134 scoped_refptr<StrictMock<MockVideoDecoder> > decoder_1_;
135 scoped_refptr<StrictMock<MockVideoDecoder> > decoder_2_; 135 scoped_refptr<StrictMock<MockVideoDecoder> > decoder_2_;
136 std::vector<scoped_refptr<VideoDecoder> > all_decoders_; 136 std::vector<scoped_refptr<VideoDecoder> > all_decoders_;
137 137
138 scoped_refptr<VideoDecoder> selected_decoder_; 138 scoped_refptr<VideoDecoder> selected_decoder_;
139 139
140 MessageLoop message_loop_; 140 MessageLoop message_loop_;
141 141
142 private: 142 private:
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 UseEncryptedStream(); 263 UseEncryptedStream();
264 InitializeDecoderSelector(kDecryptAndDecode, 1); 264 InitializeDecoderSelector(kDecryptAndDecode, 1);
265 265
266 EXPECT_CALL(*this, OnDecoderSelected(NotNull(), IsNull())) 266 EXPECT_CALL(*this, OnDecoderSelected(NotNull(), IsNull()))
267 .WillOnce(SaveArg<0>(&selected_decoder_)); 267 .WillOnce(SaveArg<0>(&selected_decoder_));
268 268
269 SelectDecoder(); 269 SelectDecoder();
270 } 270 }
271 271
272 } // namespace media 272 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698