Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / media / encrypted-media / encrypted-media-lifetime-mediakeys.html
index 722e423..f6050bc 100644 (file)
@@ -12,7 +12,9 @@
             async_test(function(test)
             {
                 // Create a MediaKeys object and free immediately.
-                MediaKeys.create('org.w3.clearkey').then(function(result) {
+                navigator.requestMediaKeySystemAccess('org.w3.clearkey').then(function(access) {
+                    return access.createMediaKeys();
+                }).then(function(result) {
                     // Do nothing with the created object
                 }).then(function(result) {
                     // No way to verify that MediaKeys object is actually
             async_test(function(test)
             {
                 var mediaKeys;
-                MediaKeys.create('org.w3.clearkey').then(function(result) {
+                navigator.requestMediaKeySystemAccess('org.w3.clearkey').then(function(access) {
+                    return access.createMediaKeys();
+                }).then(function(result) {
                     mediaKeys = result;
                     return createGCPromise();
                 }).then(function(result) {
                     // Check that the object still exists.
-                    assert_equals(mediaKeys.keySystem, 'org.w3.clearkey');
+                    assert_equals(typeof mediaKeys.createSession, 'function');
                     mediaKeys = null;
 
                     // Now that the reference is dropped, it should be