Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / media / encrypted-media / encrypted-media-lifetime-mediakeysession-release.html
index 968b765..39d1605 100644 (file)
@@ -30,7 +30,9 @@
                 }
 
                 // Create 2 sessions.
-                MediaKeys.create('org.w3.clearkey').then(function(result) {
+                navigator.requestMediaKeySystemAccess('org.w3.clearkey').then(function(access) {
+                    return access.createMediaKeys();
+                }).then(function(result) {
                     mediaKeys = result;
 
                     // Verify MediaKeys are not an ActiveDOMObject.
                     // Should be 2 MediaKeySessions.
                     assert_equals(numActiveDOMObjectsCreated(), 2, 'mediaKeys.createSession(2)');
 
-                    // Release the sessions. Once completed, only the JS
+                    // Close the sessions. Once completed, only the JS
                     // reference to them keeps them around.
-                    return mediaKeySession1.release();
+                    return mediaKeySession1.close();
                 }).then(function(result) {
-                    return mediaKeySession2.release();
+                    return mediaKeySession2.close();
                 }).then(function(result) {
                     // Since both sessions have been closed, dropping the
                     // reference to them from JS will result in the session