diff --git a/dom/media/test/eme.js b/dom/media/test/eme.js index 1ea3f06a358c..ec49c1511744 100644 --- a/dom/media/test/eme.js +++ b/dom/media/test/eme.js @@ -249,7 +249,7 @@ function LoadTest(test, elem, token, loadParams) Log(token, "sourceopen"); return Promise.all(test.tracks.map(function(track) { return AppendTrack(test, ms, track, token, loadParams); - })).then(function(){ + })).then(function() { if (loadParams && loadParams.noEndOfStream) { Log(token, "Tracks loaded"); } else { @@ -257,6 +257,8 @@ function LoadTest(test, elem, token, loadParams) ms.endOfStream(); } resolve(); + }).catch(function() { + Log(token, "error while loading tracks"); }); }) }); @@ -299,7 +301,7 @@ function SetupEME(test, token, params) // Log events dispatched to make debugging easier... [ "canplay", "canplaythrough", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "pause", "play", "playing", "progress", - "stalled", "suspend", "waiting", + "stalled", "suspend", "waiting", "waitingforkey", ].forEach(function (e) { v.addEventListener(e, function(event) { Log(token, "" + e); @@ -314,13 +316,28 @@ function SetupEME(test, token, params) : bail(token + " Failed to set MediaKeys on