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

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

Issue 423633002: Make HTMLMediaElement.setMediaKeys() asynchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase + add comment 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Clear Key Playback with Multiple Sessions</title> 4 <title>Clear Key Playback with Multiple Sessions</title>
5 <script src="encrypted-media-utils.js"></script> 5 <script src="encrypted-media-utils.js"></script>
6 <script src="../../resources/testharness.js"></script> 6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script> 7 <script src="../../resources/testharnessreport.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <video id="testVideo"></video> 10 <video id="testVideo"></video>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 function onTimeUpdate(event) 85 function onTimeUpdate(event)
86 { 86 {
87 if (event.target.currentTime < 0.2) 87 if (event.target.currentTime < 0.2)
88 return; 88 return;
89 89
90 test.done(); 90 test.done();
91 } 91 }
92 92
93 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { 93 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) {
94
95 waitForEventAndRunStep('needkey', video, onNeedKey, test); 94 waitForEventAndRunStep('needkey', video, onNeedKey, test);
96 waitForEventAndRunStep('playing', video, onPlaying, test); 95 waitForEventAndRunStep('playing', video, onPlaying, test);
97
98 video.setMediaKeys(mediaKeys);
99 video.src = '../content/test-encrypted-different-av-keys.web m'; 96 video.src = '../content/test-encrypted-different-av-keys.web m';
97 return video.setMediaKeys(mediaKeys);
98 }).then(function(result) {
100 video.play(); 99 video.play();
101 }).catch(function(error) { 100 }).catch(function(error) {
102 forceTestFailureFromPromise(test, error); 101 forceTestFailureFromPromise(test, error);
103 }); 102 });
104 }, 'Playback using Clear Key key system with multiple sessions.'); 103 }, 'Playback using Clear Key key system with multiple sessions.');
105 </script> 104 </script>
106 </body> 105 </body>
107 </html> 106 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698