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