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

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

Issue 2084053002: EME: Update tests so 'audioCapabilities' always provided (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes (+rebase) Created 4 years, 5 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 MediaKeySession lifetime without release()</title> 4 <title>Test MediaKeySession lifetime without release()</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>
(...skipping 13 matching lines...) Expand all
24 var mediaKeySession3; 24 var mediaKeySession3;
25 var initDataType; 25 var initDataType;
26 var initData; 26 var initData;
27 var startingActiveDOMObjectCount = window.internals.activeDOMObj ectCount(document); 27 var startingActiveDOMObjectCount = window.internals.activeDOMObj ectCount(document);
28 28
29 function numActiveDOMObjectsCreated() 29 function numActiveDOMObjectsCreated()
30 { 30 {
31 return window.internals.activeDOMObjectCount(document) - sta rtingActiveDOMObjectCount; 31 return window.internals.activeDOMObjectCount(document) - sta rtingActiveDOMObjectCount;
32 } 32 }
33 33
34 getSupportedInitDataType().then(function(type) { 34 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) {
35 initDataType = type; 35 initDataType = access.getConfiguration().initDataTypes[0];
36 initData = getInitData(initDataType); 36 initData = getInitData(initDataType);
37 return navigator.requestMediaKeySystemAccess('org.w3.clearke y', [{}]);
38 }).then(function(access) {
39 assert_equals(access.keySystem, 'org.w3.clearkey');
40 return access.createMediaKeys(); 37 return access.createMediaKeys();
41 }).then(function(result) { 38 }).then(function(result) {
42 mediaKeys = result; 39 mediaKeys = result;
43 assert_equals(typeof mediaKeys.createSession, 'function'); 40 assert_equals(typeof mediaKeys.createSession, 'function');
44 41
45 // Verify MediaKeys is an ActiveDOMObject. 42 // Verify MediaKeys is an ActiveDOMObject.
46 // In non-Oilpan, numActiveDOMObjectsCreate() == 1. 43 // In non-Oilpan, numActiveDOMObjectsCreate() == 1.
47 // In Oilpan, numActiveDOMObjectsCreate() <= 4. 44 // In Oilpan, numActiveDOMObjectsCreate() <= 4.
48 // (1 MediaKeys, 45 // (1 MediaKeys,
49 // 1 MediaKeysInitializer and 46 // 1 MediaKeysInitializer and
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 assert_between_inclusive(numActiveDOMObjectsCreated(), 0, 1, 'After final gc()'); 144 assert_between_inclusive(numActiveDOMObjectsCreated(), 0, 1, 'After final gc()');
148 145
149 test.done(); 146 test.done();
150 }).catch(function(error) { 147 }).catch(function(error) {
151 forceTestFailureFromPromise(test, error); 148 forceTestFailureFromPromise(test, error);
152 }); 149 });
153 }, 'MediaKeySession lifetime without release()'); 150 }, 'MediaKeySession lifetime without release()');
154 </script> 151 </script>
155 </body> 152 </body>
156 </html> 153 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698