OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test MediaKeys lifetime</title> | 4 <title>Test MediaKeys lifetime</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 // Create a MediaKeys object and free immediately. | 13 // Create a MediaKeys object and free immediately. |
15 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp
leConfiguration()).then(function(access) { | 14 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp
leConfiguration()).then(function(access) { |
16 return access.createMediaKeys(); | 15 return access.createMediaKeys(); |
17 }).then(function(result) { | 16 }).then(function(result) { |
18 // Do nothing with the created object | 17 // Do nothing with the created object |
19 }).then(function(result) { | 18 }).then(function(result) { |
20 // No way to verify that MediaKeys object is actually | 19 // No way to verify that MediaKeys object is actually |
(...skipping 25 matching lines...) Expand all Loading... |
46 return createGCPromise(); | 45 return createGCPromise(); |
47 }).then(function(result) { | 46 }).then(function(result) { |
48 test.done(); | 47 test.done(); |
49 }).catch(function(error) { | 48 }).catch(function(error) { |
50 forceTestFailureFromPromise(test, error); | 49 forceTestFailureFromPromise(test, error); |
51 }); | 50 }); |
52 }, 'MediaKeys is not collected as long as we have a reference'); | 51 }, 'MediaKeys is not collected as long as we have a reference'); |
53 </script> | 52 </script> |
54 </body> | 53 </body> |
55 </html> | 54 </html> |
OLD | NEW |