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

Unified Diff: media/test/data/eme_player_js/player_utils.js

Issue 1224053003: Clear Key CDM should resolve the promise if session not found (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« media/cdm/proxy_decryptor.cc ('K') | « media/test/data/eme_player_js/globals.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/data/eme_player_js/player_utils.js
diff --git a/media/test/data/eme_player_js/player_utils.js b/media/test/data/eme_player_js/player_utils.js
index 1fd75435af20add8acede57c1db957c17d30f54b..a532e1af7a37224d2d1f967fa1b2b7e5272a9d33 100644
--- a/media/test/data/eme_player_js/player_utils.js
+++ b/media/test/data/eme_player_js/player_utils.js
@@ -67,7 +67,12 @@ PlayerUtils.registerEMEEventListeners = function(player) {
message.target.mediaKeys.createSession('persistent-license');
addMediaKeySessionListeners(session);
session.load(player.testConfig.sessionToLoad)
- .catch(function(error) { Utils.failTest(error, EME_LOAD_FAILED); });
+ .then(
+ function(result) {
+ if (!result)
+ Utils.failTest('Session not found.', EME_SESSION_NOT_FOUND);
+ },
+ function(error) { Utils.failTest(error, EME_LOAD_FAILED); });
} else {
Utils.timeLog('Creating new media key session for initDataType: ' +
message.initDataType + ', initData: ' +
« media/cdm/proxy_decryptor.cc ('K') | « media/test/data/eme_player_js/globals.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698