Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test asynchronous creation of MediaKeys and MediaKeySession while running garbage collection</title> | 4 <title>Test asynchronous creation of MediaKeys and MediaKeySession while running garbage collection</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> | 10 <div id="log"></div> |
| 11 <script> | 11 <script> |
| 12 async_test(function(test) | 12 async_test(function(test) |
| 13 { | 13 { |
| 14 // Run garbage collection often. | 14 // Run garbage collection often. |
| 15 setInterval(asyncGC, 0); | 15 setInterval(asyncGC, 0); |
| 16 | 16 |
| 17 var mediaKeySession; | |
| 17 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { | 18 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { |
| 18 var initDataType = getInitDataType(); | 19 var initDataType = getInitDataType(); |
| 19 return mediaKeys.createSession(initDataType, getInitData(ini tDataType)); | 20 mediaKeySession = mediaKeys.createSession(); |
| 20 }).then(function(mediaKeySession) { | 21 return mediaKeySession.generateRequest(initDataType, getInit Data(initDataType)); |
| 22 }).then(function(result) { | |
|
ddorwin
2014/09/09 00:44:35
There is no result value.
jrummell
2014/09/09 19:55:58
Done.
| |
| 21 return mediaKeySession.release(); | 23 return mediaKeySession.release(); |
| 22 }).then(function(result) { | 24 }).then(function(result) { |
| 23 test.done(); | 25 test.done(); |
| 24 }).catch(function(error) { | 26 }).catch(function(error) { |
| 25 forceTestFailureFromPromise(test, error); | 27 forceTestFailureFromPromise(test, error); |
| 26 }); | 28 }); |
| 27 }, 'Test asynchronous creation of MediaKeys and MediaKeySession whil e running garbage collection.'); | 29 }, 'Test asynchronous creation of MediaKeys and MediaKeySession whil e running garbage collection.'); |
| 28 </script> | 30 </script> |
| 29 </body> | 31 </body> |
| 30 </html> | 32 </html> |
| OLD | NEW |