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

Side by Side Diff: media/cdm/aes_decryptor_unittest.cc

Issue 179123009: Encrypted Media: Use uint32 for systemCode in SessionError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "media/base/decoder_buffer.h" 10 #include "media/base/decoder_buffer.h"
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 325
326 MOCK_METHOD2(OnSessionCreated, 326 MOCK_METHOD2(OnSessionCreated,
327 void(uint32 session_id, const std::string& web_session_id)); 327 void(uint32 session_id, const std::string& web_session_id));
328 MOCK_METHOD3(OnSessionMessage, 328 MOCK_METHOD3(OnSessionMessage,
329 void(uint32 session_id, 329 void(uint32 session_id,
330 const std::vector<uint8>& message, 330 const std::vector<uint8>& message,
331 const std::string& default_url)); 331 const std::string& default_url));
332 MOCK_METHOD1(OnSessionReady, void(uint32 session_id)); 332 MOCK_METHOD1(OnSessionReady, void(uint32 session_id));
333 MOCK_METHOD1(OnSessionClosed, void(uint32 session_id)); 333 MOCK_METHOD1(OnSessionClosed, void(uint32 session_id));
334 MOCK_METHOD3(OnSessionError, 334 MOCK_METHOD3(OnSessionError,
335 void(uint32 session_id, MediaKeys::KeyError, int system_code)); 335 void(uint32 session_id,
336 MediaKeys::KeyError,
337 uint32 system_code));
336 338
337 AesDecryptor decryptor_; 339 AesDecryptor decryptor_;
338 AesDecryptor::DecryptCB decrypt_cb_; 340 AesDecryptor::DecryptCB decrypt_cb_;
339 341
340 // Constants for testing. 342 // Constants for testing.
341 const std::vector<uint8> original_data_; 343 const std::vector<uint8> original_data_;
342 const std::vector<uint8> encrypted_data_; 344 const std::vector<uint8> encrypted_data_;
343 const std::vector<uint8> subsample_encrypted_data_; 345 const std::vector<uint8> subsample_encrypted_data_;
344 const std::vector<uint8> key_id_; 346 const std::vector<uint8> key_id_;
345 const std::vector<uint8> iv_; 347 const std::vector<uint8> iv_;
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 " \"kid\": \"\"," 754 " \"kid\": \"\","
753 " \"k\": \"BAUGBwgJCgsMDQ4PEBESEw\"" 755 " \"k\": \"BAUGBwgJCgsMDQ4PEBESEw\""
754 " }" 756 " }"
755 " ]" 757 " ]"
756 "}"; 758 "}";
757 UpdateSessionAndExpect(session_id, kJwksWithEmptyKeyId, SESSION_ERROR); 759 UpdateSessionAndExpect(session_id, kJwksWithEmptyKeyId, SESSION_ERROR);
758 ReleaseSession(session_id); 760 ReleaseSession(session_id);
759 } 761 }
760 762
761 } // namespace media 763 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698