Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: LayoutTests/media/encrypted-media/encrypted-media-async-creation-with-gc.html

Issue 568033003: Implement MediaKeySession close() and remove() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 var mediaKeySession;
18 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { 18 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) {
19 var initDataType = getInitDataType(); 19 var initDataType = getInitDataType();
20 mediaKeySession = mediaKeys.createSession(); 20 mediaKeySession = mediaKeys.createSession();
21 return mediaKeySession.generateRequest(initDataType, getInit Data(initDataType)); 21 return mediaKeySession.generateRequest(initDataType, getInit Data(initDataType));
22 }).then(function() { 22 }).then(function() {
23 return mediaKeySession.release(); 23 return mediaKeySession.close();
24 }).then(function(result) { 24 }).then(function(result) {
25 test.done(); 25 test.done();
26 }).catch(function(error) { 26 }).catch(function(error) {
27 forceTestFailureFromPromise(test, error); 27 forceTestFailureFromPromise(test, error);
28 }); 28 });
29 }, '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.');
30 </script> 30 </script>
31 </body> 31 </body>
32 </html> 32 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698