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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« media/cdm/aes_decryptor.cc ('K') | « media/cdm/aes_decryptor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-multiple-close.html
diff --git a/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-multiple-close.html b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-multiple-close.html
new file mode 100644
index 0000000000000000000000000000000000000000..3db68cb9c6cf684f7961e698ce9a3eb45540f9d6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/media/encrypted-media/encrypted-media-session-multiple-close.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Test multiple calls to MediaKeySession.close()</title>
xhwang 2016/12/07 06:51:42 Please add a reference to the spec bug.
jrummell 2016/12/07 22:26:50 Done (in comments below).
+ <script src="encrypted-media-utils.js"></script>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ </head>
+ <body>
+ <script>
+ async_test(function(test)
+ {
+ var initDataType;
+ var initData;
+ var mediaKeySession;
+
+ navigator.requestMediaKeySystemAccess('org.w3.clearkey', getSimpleConfiguration()).then(function(access) {
+ initDataType = access.getConfiguration().initDataTypes[0];
+ initData = getInitData(initDataType);
+ return access.createMediaKeys();
+ }).then(function(mediaKeys) {
+ mediaKeySession = mediaKeys.createSession();
+ return mediaKeySession.generateRequest(initDataType, initData);
+ }).then(function() {
+ // Call close() multiple times.
+ return Promise.all([mediaKeySession.close(), mediaKeySession.close(), mediaKeySession.close()]);
+ }).then(function() {
+ test.done();
+ }).catch(function(error) {
+ forceTestFailureFromPromise(test, error);
+ });
+ }, 'Test multiple calls to MediaKeySession.close().');
+ </script>
+ </body>
+</html>
« media/cdm/aes_decryptor.cc ('K') | « media/cdm/aes_decryptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698