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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release.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>MediaKeySession lifetime after release()</title> 4 <title>MediaKeySession lifetime after 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 12 matching lines...) Expand all
23 var initDataType; 23 var initDataType;
24 var initData; 24 var initData;
25 var startingActiveDOMObjectCount = window.internals.activeDOMObj ectCount(document); 25 var startingActiveDOMObjectCount = window.internals.activeDOMObj ectCount(document);
26 26
27 function numActiveDOMObjectsCreated() 27 function numActiveDOMObjectsCreated()
28 { 28 {
29 return window.internals.activeDOMObjectCount(document) - sta rtingActiveDOMObjectCount; 29 return window.internals.activeDOMObjectCount(document) - sta rtingActiveDOMObjectCount;
30 } 30 }
31 31
32 // Create 2 sessions. 32 // Create 2 sessions.
33 getSupportedInitDataType().then(function(type) { 33 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) {
34 initDataType = type; 34 initDataType = access.getConfiguration().initDataTypes[0];
35 initData = getInitData(initDataType); 35 initData = getInitData(initDataType);
36 return navigator.requestMediaKeySystemAccess('org.w3.clearke y', [{}]);
37 }).then(function(access) {
38 return access.createMediaKeys(); 36 return access.createMediaKeys();
39 }).then(function(result) { 37 }).then(function(result) {
40 mediaKeys = result; 38 mediaKeys = result;
41 39
42 // Verify MediaKeys is an ActiveDOMObject. 40 // Verify MediaKeys is an ActiveDOMObject.
43 // In non-Oilpan, numActiveDOMObjectsCreate() == 1. 41 // In non-Oilpan, numActiveDOMObjectsCreate() == 1.
44 // In Oilpan, numActiveDOMObjectsCreate() <= 4. 42 // In Oilpan, numActiveDOMObjectsCreate() <= 4.
45 // (1 MediaKeys, 43 // (1 MediaKeys,
46 // 1 MediaKeysInitializer and 44 // 1 MediaKeysInitializer and
47 // 1 MediaKeySystemAccessInitializer (navigator.requestMedi aKeySystemAccess() use above), 45 // 1 MediaKeySystemAccessInitializer (navigator.requestMedi aKeySystemAccess() use above),
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // In non-Oilpan, there is also something from createGCPromi se(). 105 // In non-Oilpan, there is also something from createGCPromi se().
108 assert_between_inclusive(numActiveDOMObjectsCreated(), 1, 2, 'mediaKeySession2 not collected'); 106 assert_between_inclusive(numActiveDOMObjectsCreated(), 1, 2, 'mediaKeySession2 not collected');
109 test.done(); 107 test.done();
110 }).catch(function(error) { 108 }).catch(function(error) {
111 forceTestFailureFromPromise(test, error); 109 forceTestFailureFromPromise(test, error);
112 }); 110 });
113 }, 'MediaKeySession lifetime after release()'); 111 }, 'MediaKeySession lifetime after release()');
114 </script> 112 </script>
115 </body> 113 </body>
116 </html> 114 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698