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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-lifetime-mediakeysession-release-noreference.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 after release() without references< /title> 4 <title>Test MediaKeySession lifetime after release() without references< /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 23
24 function numActiveDOMObjectsCreated() 24 function numActiveDOMObjectsCreated()
25 { 25 {
26 return window.internals.activeDOMObjectCount(document) - sta rtingActiveDOMObjectCount; 26 return window.internals.activeDOMObjectCount(document) - sta rtingActiveDOMObjectCount;
27 } 27 }
28 28
29 // Create 2 sessions. 29 // Create 2 sessions.
30 var mediaKeys; 30 var mediaKeys;
31 var mediaKeySession1; 31 var mediaKeySession1;
32 var mediaKeySession2; 32 var mediaKeySession2;
33 getSupportedInitDataType().then(function(type) { 33
34 initDataType = type; 34 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) {
35 initDataType = access.getConfiguration().initDataTypes[0];
35 initData = getInitData(initDataType); 36 initData = getInitData(initDataType);
36 return navigator.requestMediaKeySystemAccess('org.w3.clearke y', [{}]);
37 }).then(function(access) {
38 return access.createMediaKeys(); 37 return access.createMediaKeys();
39 }).then(function(result) { 38 }).then(function(result) {
40 mediaKeys = result; 39 mediaKeys = result;
41 40
42 // Verify MediaKeys is an ActiveDOMObject. 41 // Verify MediaKeys is an ActiveDOMObject.
43 // In non-Oilpan, numActiveDOMObjectsCreate() == 1. 42 // In non-Oilpan, numActiveDOMObjectsCreate() == 1.
44 // In Oilpan, numActiveDOMObjectsCreate() <= 4. 43 // In Oilpan, numActiveDOMObjectsCreate() <= 4.
45 // (1 MediaKeys, 44 // (1 MediaKeys,
46 // 1 MediaKeysInitializer and 45 // 1 MediaKeysInitializer and
47 // 1 MediaKeySystemAccessInitializer (navigator.requestMedi aKeySystemAccess() use above), 46 // 1 MediaKeySystemAccessInitializer (navigator.requestMedi aKeySystemAccess() use above),
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 118
120 assert_not_equals(mediaKeys, null); 119 assert_not_equals(mediaKeys, null);
121 test.done(); 120 test.done();
122 }).catch(function(error) { 121 }).catch(function(error) {
123 forceTestFailureFromPromise(test, error); 122 forceTestFailureFromPromise(test, error);
124 }); 123 });
125 }, 'MediaKeySession lifetime after release() without references'); 124 }, 'MediaKeySession lifetime after release() without references');
126 </script> 125 </script>
127 </body> 126 </body>
128 </html> 127 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698