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

Side by Side Diff: webkit/media/crypto/proxy_decryptor_unittest.cc

Issue 10964055: Call Decryptor::Stop() in FFmpegVideoDecoder::Reset(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « webkit/media/crypto/proxy_decryptor.cc ('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 "webkit/media/crypto/proxy_decryptor.h" 5 #include "webkit/media/crypto/proxy_decryptor.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 EXPECT_CALL(client_, NeedKeyMock("", "", NotNull(), arraysize(kFakeKeyId))) 207 EXPECT_CALL(client_, NeedKeyMock("", "", NotNull(), arraysize(kFakeKeyId)))
208 .Times(AtLeast(1)); 208 .Times(AtLeast(1));
209 EXPECT_CALL(*real_decryptor_, Decrypt(encrypted_buffer_, _)) 209 EXPECT_CALL(*real_decryptor_, Decrypt(encrypted_buffer_, _))
210 .WillRepeatedly(RunDecryptCB(Decryptor::kNoKey, null_buffer_)); 210 .WillRepeatedly(RunDecryptCB(Decryptor::kNoKey, null_buffer_));
211 proxy_decryptor_.Decrypt(encrypted_buffer_, decrypt_cb_); 211 proxy_decryptor_.Decrypt(encrypted_buffer_, decrypt_cb_);
212 GenerateKeyRequest(); 212 GenerateKeyRequest();
213 proxy_decryptor_.Decrypt(encrypted_buffer_, decrypt_cb_); 213 proxy_decryptor_.Decrypt(encrypted_buffer_, decrypt_cb_);
214 AddKey(); // An irrelevant key is added. 214 AddKey(); // An irrelevant key is added.
215 proxy_decryptor_.Decrypt(encrypted_buffer_, decrypt_cb_); 215 proxy_decryptor_.Decrypt(encrypted_buffer_, decrypt_cb_);
216 216
217 EXPECT_CALL(*real_decryptor_, Stop()); 217 EXPECT_CALL(*real_decryptor_, CancelDecrypt());
218 EXPECT_CALL(*this, BufferDecrypted(Decryptor::kError, null_buffer_)) 218 EXPECT_CALL(*this, BufferDecrypted(Decryptor::kError, null_buffer_))
219 .Times(3); 219 .Times(3);
220 proxy_decryptor_.Stop(); 220 proxy_decryptor_.CancelDecrypt();
221 221
222 message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure()); 222 message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure());
223 message_loop_.Run(); 223 message_loop_.Run();
224 } 224 }
225 225
226 } // namespace webkit_media 226 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/crypto/proxy_decryptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698