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

Unified Diff: LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html

Issue 543173002: Implement MediaKeySession.generateRequest() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 3 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: LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html b/LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html
index 10963c77df23f7308dea0758997fe2d10fd0b4a7..4737ffe6cdfeadda6085e64f36fe9ceefffb9185 100644
--- a/LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html
+++ b/LayoutTests/media/encrypted-media/encrypted-media-playback-multiple-sessions.html
@@ -30,16 +30,18 @@
function onNeedKey(event)
{
var keyId = String.fromCharCode.apply(null, event.initData);
- video.mediaKeys.createSession(event.contentType, event.initData).then(function(newSession) {
+
+ var mediaKeySession = video.mediaKeys.createSession();
+ waitForEventAndRunStep('message', mediaKeySession, onMessage, test);
+ mediaKeySession.generateRequest(event.contentType, event.initData).then(function() {
if (keyId == videoKeyId) {
assert_equals(videoMediaKeySession, null);
- videoMediaKeySession = newSession;
+ videoMediaKeySession = mediaKeySession;
} else {
assert_equals(keyId, audioKeyId);
assert_equals(audioMediaKeySession, null);
- audioMediaKeySession = newSession;
+ audioMediaKeySession = mediaKeySession;
}
- waitForEventAndRunStep('message', newSession, onMessage, test);
}).catch(function(error) {
forceTestFailureFromPromise(test, error);
});

Powered by Google App Engine
This is Rietveld 408576698