OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test MediaKeys lifetime when adding a session</title> | 4 <title>Test MediaKeys lifetime when adding a session</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 // MediaKeySessions remain as long as: | 11 // MediaKeySessions remain as long as: |
13 // JavaScript has a reference to it | 12 // JavaScript has a reference to it |
14 // OR (MediaKeys is around | 13 // OR (MediaKeys is around |
15 // AND the session has not received a close() event) | 14 // AND the session has not received a close() event) |
16 // In the tests below, we do not close any session nor keep a | 15 // In the tests below, we do not close any session nor keep a |
17 // Javascript reference to any session, so MediaKeySessions remain | 16 // Javascript reference to any session, so MediaKeySessions remain |
18 // as long as the associated MediaKeys object is around. | 17 // as long as the associated MediaKeys object is around. |
19 | 18 |
20 // For this test, create a MediaKeySession and verify lifetime. | 19 // For this test, create a MediaKeySession and verify lifetime. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 assert_between_inclusive(numActiveDOMObjectsCreated(), 0, 1,
'After final gc()'); | 90 assert_between_inclusive(numActiveDOMObjectsCreated(), 0, 1,
'After final gc()'); |
92 | 91 |
93 test.done(); | 92 test.done(); |
94 }).catch(function(error) { | 93 }).catch(function(error) { |
95 forceTestFailureFromPromise(test, error); | 94 forceTestFailureFromPromise(test, error); |
96 }); | 95 }); |
97 }, 'MediaKeys lifetime with session'); | 96 }, 'MediaKeys lifetime with session'); |
98 </script> | 97 </script> |
99 </body> | 98 </body> |
100 </html> | 99 </html> |
OLD | NEW |