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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeys.html

Issue 2270383002: clean up encrypted-media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test MediaKeys lifetime</title> 4 <title>Test MediaKeys lifetime</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 // Create a MediaKeys object and free immediately. 13 // Create a MediaKeys object and free immediately.
15 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) { 14 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) {
16 return access.createMediaKeys(); 15 return access.createMediaKeys();
17 }).then(function(result) { 16 }).then(function(result) {
18 // Do nothing with the created object 17 // Do nothing with the created object
19 }).then(function(result) { 18 }).then(function(result) {
20 // No way to verify that MediaKeys object is actually 19 // No way to verify that MediaKeys object is actually
(...skipping 25 matching lines...) Expand all
46 return createGCPromise(); 45 return createGCPromise();
47 }).then(function(result) { 46 }).then(function(result) {
48 test.done(); 47 test.done();
49 }).catch(function(error) { 48 }).catch(function(error) {
50 forceTestFailureFromPromise(test, error); 49 forceTestFailureFromPromise(test, error);
51 }); 50 });
52 }, 'MediaKeys is not collected as long as we have a reference'); 51 }, 'MediaKeys is not collected as long as we have a reference');
53 </script> 52 </script>
54 </body> 53 </body>
55 </html> 54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698