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

Side by Side Diff: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-multiple-close.html

Issue 2545083004: [eme] Handle multiple calls to MediaKeySession.close() (Closed)
Patch Set: rebase for MediaKeys rename Created 4 years 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 | « media/cdm/aes_decryptor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Test multiple calls to MediaKeySession.close()</title>
5 <script src="encrypted-media-utils.js"></script>
6 <script src="../../resources/testharness.js"></script>
7 <script src="../../resources/testharnessreport.js"></script>
8 </head>
9 <body>
10 <script>
11 // This test verifies that Chrome handles multiple close() calls
12 // correctly. Currently the EME spec has the check for session
13 // already closed happen immediately when the method is called,
14 // but the action is performed asynchronously.
15 // https://github.com/w3c/encrypted-media/issues/365
16
17 async_test(function(test)
18 {
19 var initDataType;
20 var initData;
21 var mediaKeySession;
22
23 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimp leConfiguration()).then(function(access) {
24 initDataType = access.getConfiguration().initDataTypes[0];
25 initData = getInitData(initDataType);
26 return access.createMediaKeys();
27 }).then(function(mediaKeys) {
28 mediaKeySession = mediaKeys.createSession();
29 return mediaKeySession.generateRequest(initDataType, initDat a);
30 }).then(function() {
31 // Call close() multiple times.
32 return Promise.all([mediaKeySession.close(), mediaKeySession .close(), mediaKeySession.close()]);
33 }).then(function() {
34 test.done();
35 }).catch(function(error) {
36 forceTestFailureFromPromise(test, error);
37 });
38 }, 'Test multiple calls to MediaKeySession.close().');
39 </script>
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698