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

Side by Side Diff: third_party/WebKit/LayoutTests/media/resources/encrypted-media-session-close-and-context-destroyed-iframe.html

Issue 2454333002: Add EME Layout test for unclosed the key session (Closed)
Patch Set: Add EME Layout test for unclosed the key session 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../encrypted-media/encrypted-media-utils.js"></script>
4 </head>
5 <body>
6 <script>
7 var initDataType;
8 var initData;
9 var mediaKeySession;
10
11 window.onmessage = function(e) {
12 if (e.data.comm == 'init') {
13 navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimpleCo nfiguration()).then(function(access) {
14 initDataType = access.getConfiguration().initDataTypes[0 ];
15 initData = getInitData(initDataType);
16 return access.createMediaKeys();
17 }).then(function(mediaKeys) {
18 mediaKeySession = mediaKeys.createSession();
19 return mediaKeySession.generateRequest(initDataType, initData);
20 }).then(function() {
21 window.parent.postMessage({comm: 'init-completed'}, '*');
22 });
23 } else if (e.data.comm == 'close') {
24 window.parent.postMessage({comm: 'close-received'}, '*');
25 mediaKeySession.close().catch(function(error) {
26 window.parent.postMessage({result: 'error'}, '*');
27 });
28 }
29 };
30 </script>'
31 </body>
32 </html>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-close-and-context-destroyed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698