OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test multiple MediaKeys lifetimes</title> | 4 <title>Test multiple MediaKeys lifetimes</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 // For this test, create several MediaKeys and verify lifetime. | 11 // For this test, create several MediaKeys and verify lifetime. |
13 async_test(function(test) | 12 async_test(function(test) |
14 { | 13 { |
15 var mediaKeys; | 14 var mediaKeys; |
16 var startingActiveDOMObjectCount = window.internals.activeDOMObj
ectCount(document); | 15 var startingActiveDOMObjectCount = window.internals.activeDOMObj
ectCount(document); |
17 | 16 |
18 function numActiveDOMObjectsCreated() | 17 function numActiveDOMObjectsCreated() |
19 { | 18 { |
20 return window.internals.activeDOMObjectCount(document) - sta
rtingActiveDOMObjectCount; | 19 return window.internals.activeDOMObjectCount(document) - sta
rtingActiveDOMObjectCount; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // Should be just a DOMTimer. | 117 // Should be just a DOMTimer. |
119 assert_less_than_equal(numActiveDOMObjectsCreated(), 1); | 118 assert_less_than_equal(numActiveDOMObjectsCreated(), 1); |
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 }, 'Multiple MediaKeys lifetime'); | 123 }, 'Multiple MediaKeys lifetime'); |
125 </script> | 124 </script> |
126 </body> | 125 </body> |
127 </html> | 126 </html> |
OLD | NEW |