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

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

Issue 2270383002: clean up encrypted-media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-async-setcert-with-gc.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>
11 <script> 10 <script>
12 async_test(function(test) 11 async_test(function(test)
13 { 12 {
14 // Run garbage collection often. 13 // Run garbage collection often.
15 setInterval(asyncGC, 0); 14 setInterval(asyncGC, 0);
16 15
17 var initDataType; 16 var initDataType;
18 var initData; 17 var initData;
19 var mediaKeySession; 18 var mediaKeySession;
20 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) { 19 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) {
21 initDataType = access.getConfiguration().initDataTypes[0]; 20 initDataType = access.getConfiguration().initDataTypes[0];
22 initData = getInitData(initDataType); 21 initData = getInitData(initDataType);
23 return access.createMediaKeys(); 22 return access.createMediaKeys();
24 }).then(function(mediaKeys) { 23 }).then(function(mediaKeys) {
25 mediaKeySession = mediaKeys.createSession(); 24 mediaKeySession = mediaKeys.createSession();
26 return mediaKeySession.generateRequest(initDataType, initDat a); 25 return mediaKeySession.generateRequest(initDataType, initDat a);
27 }).then(function() { 26 }).then(function() {
28 return mediaKeySession.close(); 27 return mediaKeySession.close();
29 }).then(function(result) { 28 }).then(function(result) {
30 test.done(); 29 test.done();
31 }).catch(function(error) { 30 }).catch(function(error) {
32 forceTestFailureFromPromise(test, error); 31 forceTestFailureFromPromise(test, error);
33 }); 32 });
34 }, 'Test asynchronous creation of MediaKeys and MediaKeySession whil e running garbage collection.'); 33 }, 'Test asynchronous creation of MediaKeys and MediaKeySession whil e running garbage collection.');
35 </script> 34 </script>
36 </body> 35 </body>
37 </html> 36 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-async-setcert-with-gc.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698