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

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

Issue 2444683002: Move MediaKeys::Exception to CdmPromise::Exception (Closed)
Patch Set: include "media/base/media_keys.h" Created 4 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/cdm/aes_decryptor.cc ('k') | media/cdm/cdm_adapter.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 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 "media/cdm/aes_decryptor.h" 5 #include "media/cdm/aes_decryptor.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 EXPECT_EQ(expected_result, RESOLVED) << "Unexpectedly resolved."; 285 EXPECT_EQ(expected_result, RESOLVED) << "Unexpectedly resolved.";
286 EXPECT_GT(session_id.length(), 0ul); 286 EXPECT_GT(session_id.length(), 0ul);
287 session_id_ = session_id; 287 session_id_ = session_id;
288 } 288 }
289 289
290 void OnResolve(ExpectedResult expected_result) { 290 void OnResolve(ExpectedResult expected_result) {
291 EXPECT_EQ(expected_result, RESOLVED) << "Unexpectedly resolved."; 291 EXPECT_EQ(expected_result, RESOLVED) << "Unexpectedly resolved.";
292 } 292 }
293 293
294 void OnReject(ExpectedResult expected_result, 294 void OnReject(ExpectedResult expected_result,
295 MediaKeys::Exception exception_code, 295 CdmPromise::Exception exception_code,
296 uint32_t system_code, 296 uint32_t system_code,
297 const std::string& error_message) { 297 const std::string& error_message) {
298 EXPECT_EQ(expected_result, REJECTED) 298 EXPECT_EQ(expected_result, REJECTED)
299 << "Unexpectedly rejected with message: " << error_message; 299 << "Unexpectedly rejected with message: " << error_message;
300 } 300 }
301 301
302 std::unique_ptr<SimpleCdmPromise> CreatePromise( 302 std::unique_ptr<SimpleCdmPromise> CreatePromise(
303 ExpectedResult expected_result) { 303 ExpectedResult expected_result) {
304 std::unique_ptr<SimpleCdmPromise> promise(new CdmCallbackPromise<>( 304 std::unique_ptr<SimpleCdmPromise> promise(new CdmCallbackPromise<>(
305 base::Bind(&AesDecryptorTest::OnResolve, base::Unretained(this), 305 base::Bind(&AesDecryptorTest::OnResolve, base::Unretained(this),
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 INSTANTIATE_TEST_CASE_P(CdmAdapter, 1025 INSTANTIATE_TEST_CASE_P(CdmAdapter,
1026 AesDecryptorTest, 1026 AesDecryptorTest,
1027 testing::Values("CdmAdapter")); 1027 testing::Values("CdmAdapter"));
1028 #endif 1028 #endif
1029 1029
1030 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/ 1030 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/
1031 // MojoDecryptorService are implemented, add a third version that tests the 1031 // MojoDecryptorService are implemented, add a third version that tests the
1032 // CDM via mojo. 1032 // CDM via mojo.
1033 1033
1034 } // namespace media 1034 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | media/cdm/cdm_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698