OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test MediaKeySession lifetime after release() without references<
/title> | 4 <title>Test MediaKeySession lifetime after release() without references<
/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 // Since MediaKeySession (and MediaKeys) are ActiveDOMObjects, | 11 // Since MediaKeySession (and MediaKeys) are ActiveDOMObjects, |
13 // we can determine when they are garbage collected. | 12 // we can determine when they are garbage collected. |
14 // MediaKeySessions remain as long as: | 13 // MediaKeySessions remain as long as: |
15 // JavaScript has a reference to it | 14 // JavaScript has a reference to it |
16 // OR (MediaKeys is around | 15 // OR (MediaKeys is around |
17 // AND the session has not received a close() event) | 16 // AND the session has not received a close() event) |
18 async_test(function(test) | 17 async_test(function(test) |
19 { | 18 { |
20 var initDataType; | 19 var initDataType; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 117 |
119 assert_not_equals(mediaKeys, null); | 118 assert_not_equals(mediaKeys, null); |
120 test.done(); | 119 test.done(); |
121 }).catch(function(error) { | 120 }).catch(function(error) { |
122 forceTestFailureFromPromise(test, error); | 121 forceTestFailureFromPromise(test, error); |
123 }); | 122 }); |
124 }, 'MediaKeySession lifetime after release() without references'); | 123 }, 'MediaKeySession lifetime after release() without references'); |
125 </script> | 124 </script> |
126 </body> | 125 </body> |
127 </html> | 126 </html> |
OLD | NEW |