OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test MediaKeySession closed event</title> | 4 <title>Test MediaKeySession closed event</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 <div id="log"></div> | |
11 <script> | 10 <script> |
12 async_test(function(test) | 11 async_test(function(test) |
13 { | 12 { |
14 var initDataType; | 13 var initDataType; |
15 var initData; | 14 var initData; |
16 var mediaKeySession; | 15 var mediaKeySession; |
17 | 16 |
18 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp
leConfiguration()).then(function(access) { | 17 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp
leConfiguration()).then(function(access) { |
19 initDataType = access.getConfiguration().initDataTypes[0]; | 18 initDataType = access.getConfiguration().initDataTypes[0]; |
20 initData = getInitData(initDataType); | 19 initData = getInitData(initDataType); |
(...skipping 17 matching lines...) Expand all Loading... |
38 // release() should result in the closed promise being | 37 // release() should result in the closed promise being |
39 // fulfilled. | 38 // fulfilled. |
40 return mediaKeySession.close(); | 39 return mediaKeySession.close(); |
41 }).catch(function(error) { | 40 }).catch(function(error) { |
42 forceTestFailureFromPromise(test, error); | 41 forceTestFailureFromPromise(test, error); |
43 }); | 42 }); |
44 }, 'Test MediaKeySession closed event.'); | 43 }, 'Test MediaKeySession closed event.'); |
45 </script> | 44 </script> |
46 </body> | 45 </body> |
47 </html> | 46 </html> |
OLD | NEW |