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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-waiting-for-a-key.html

Issue 2084053002: EME: Update tests so 'audioCapabilities' always provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: avConfiguration 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>Waiting for a key.</title> 4 <title>Waiting for a key.</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 25 matching lines...) Expand all
36 test.done(); 36 test.done();
37 }; 37 };
38 38
39 // As this code doesn't wait for the 'message' event to avoid 39 // As this code doesn't wait for the 'message' event to avoid
40 // race conditions with 'waitingforkey', specify the key ID and 40 // race conditions with 'waitingforkey', specify the key ID and
41 // key used by the encrypted content. 41 // key used by the encrypted content.
42 var keyId = stringToUint8Array('0123456789012345'); 42 var keyId = stringToUint8Array('0123456789012345');
43 var rawKey = new Uint8Array([0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b, 43 var rawKey = new Uint8Array([0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b,
44 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c]); 44 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c]);
45 45
46 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]).then(function(access) { 46 return navigator.requestMediaKeySystemAccess('org.w3.clearkey', avConfiguration('webm')).then(function(access) {
47 debugMessage = 'createMediaKeys()'; 47 debugMessage = 'createMediaKeys()';
48 return access.createMediaKeys(); 48 return access.createMediaKeys();
49 }).then(function(mediaKeys) { 49 }).then(function(mediaKeys) {
50 debugMessage = 'setMediaKeys()'; 50 debugMessage = 'setMediaKeys()';
51 return video.setMediaKeys(mediaKeys); 51 return video.setMediaKeys(mediaKeys);
52 }).then(function() { 52 }).then(function() {
53 video.src = '../content/test-encrypted.webm'; 53 video.src = '../content/test-encrypted.webm';
54 video.play(); 54 video.play();
55 debugMessage = 'wait_for_encrypted_event()'; 55 debugMessage = 'wait_for_encrypted_event()';
56 return wait_for_encrypted_event(video); 56 return wait_for_encrypted_event(video);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (video.currentTime < 0.2) 154 if (video.currentTime < 0.2)
155 return; 155 return;
156 video.removeEventListener('timeupdate', listener); 156 video.removeEventListener('timeupdate', listener);
157 resolve(e); 157 resolve(e);
158 }); 158 });
159 }); 159 });
160 }; 160 };
161 </script> 161 </script>
162 </body> 162 </body>
163 </html> 163 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698