OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>setMediaKeys() on multiple video elements.</title> | 4 <title>setMediaKeys() on multiple video elements.</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="video1"></video> | 10 <video id="video1"></video> |
11 <video id="video2"></video> | 11 <video id="video2"></video> |
12 <div id="log"></div> | |
13 <script> | 12 <script> |
14 promise_test(function(test) | 13 promise_test(function(test) |
15 { | 14 { |
16 var video1 = document.getElementById('video1'); | 15 var video1 = document.getElementById('video1'); |
17 var video2 = document.getElementById('video2'); | 16 var video2 = document.getElementById('video2'); |
18 var mediaKeys; | 17 var mediaKeys; |
19 | 18 |
20 return navigator.requestMediaKeySystemAccess('org.w3.clearkey',
getSimpleConfiguration()).then(function(access) { | 19 return navigator.requestMediaKeySystemAccess('org.w3.clearkey',
getSimpleConfiguration()).then(function(access) { |
21 return access.createMediaKeys(); | 20 return access.createMediaKeys(); |
22 }).then(function(result) { | 21 }).then(function(result) { |
(...skipping 14 matching lines...) Expand all Loading... |
37 // Now clear it from video1. | 36 // Now clear it from video1. |
38 return video1.setMediaKeys(null); | 37 return video1.setMediaKeys(null); |
39 }).then(function() { | 38 }).then(function() { |
40 // Should be assignable to video2. | 39 // Should be assignable to video2. |
41 return video2.setMediaKeys(mediaKeys); | 40 return video2.setMediaKeys(mediaKeys); |
42 }); | 41 }); |
43 }, 'setMediaKeys() on multiple video elements.'); | 42 }, 'setMediaKeys() on multiple video elements.'); |
44 </script> | 43 </script> |
45 </body> | 44 </body> |
46 </html> | 45 </html> |
OLD | NEW |