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

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

Issue 2084053002: EME: Update tests so 'audioCapabilities' always provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes (+rebase) Created 4 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 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>
11 <div id="log"></div> 11 <div id="log"></div>
12 <script> 12 <script>
13 async_test(function(test) 13 async_test(function(test)
14 { 14 {
15 var video = document.getElementById('testVideo'); 15 var video = document.getElementById('testVideo');
16 var content = '../content/test-encrypted-different-av-keys.webm' ;
16 var audioMediaKeySession = null; 17 var audioMediaKeySession = null;
17 var videoMediaKeySession = null; 18 var videoMediaKeySession = null;
18 var audioInitDataType = null; 19 var audioInitDataType = null;
19 var videoInitDataType = null; 20 var videoInitDataType = null;
20 var audioInitData = null; 21 var audioInitData = null;
21 var videoInitData = null; 22 var videoInitData = null;
22 var audioKeyProvided = false; 23 var audioKeyProvided = false;
23 var videoKeyProvided = false; 24 var videoKeyProvided = false;
24 25
25 // The 2 streams use different key ids and different keys. 26 // The 2 streams use different key ids and different keys.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 114 }
114 115
115 function onTimeUpdate(event) 116 function onTimeUpdate(event)
116 { 117 {
117 if (event.target.currentTime < 0.2) 118 if (event.target.currentTime < 0.2)
118 return; 119 return;
119 120
120 test.done(); 121 test.done();
121 } 122 }
122 123
123 navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]).t hen(function(access) { 124 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getConf igurationForFile(content)).then(function(access) {
124 return access.createMediaKeys(); 125 return access.createMediaKeys();
125 }).then(function(mediaKeys) { 126 }).then(function(mediaKeys) {
126 waitForEventAndRunStep('encrypted', video, onEncrypted, test ); 127 waitForEventAndRunStep('encrypted', video, onEncrypted, test );
127 waitForEventAndRunStep('playing', video, onPlaying, test); 128 waitForEventAndRunStep('playing', video, onPlaying, test);
128 video.src = '../content/test-encrypted-different-av-keys.web m'; 129 video.src = content;
129 return video.setMediaKeys(mediaKeys); 130 return video.setMediaKeys(mediaKeys);
130 }).then(function(result) { 131 }).then(function(result) {
131 video.play(); 132 video.play();
132 }).catch(function(error) { 133 }).catch(function(error) {
133 forceTestFailureFromPromise(test, error); 134 forceTestFailureFromPromise(test, error);
134 }); 135 });
135 }, 'Playback using Clear Key key system with multiple sessions.'); 136 }, 'Playback using Clear Key key system with multiple sessions.');
136 </script> 137 </script>
137 </body> 138 </body>
138 </html> 139 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698