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

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: simplify prefixed 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
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..ceb2eddda587bd4c646d297d445461d6db468af8 100644
--- a/media/test/data/eme_player_js/player_utils.js
+++ b/media/test/data/eme_player_js/player_utils.js
@@ -67,7 +67,14 @@ 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.reportResult('Session not found.',
ddorwin 2015/07/09 00:29:35 Thanks. However, I don't think we should make this
jrummell 2015/07/10 00:16:50 Reverted.
+ 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: ' +

Powered by Google App Engine
This is Rietveld 408576698