Bug 1124491 - Test HTMLMediaElement.isEncrypted attribute - r=cpearce

This commit is contained in:
Edwin Flores 2015-01-27 19:10:11 +13:00
Родитель e49b1630b3
Коммит fabd1cd79e
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -677,6 +677,8 @@ function checkMetadata(msg, e, test) {
ok(Math.abs(e.duration - test.duration) < 0.1,
msg + " duration (" + e.duration + ") should be around " + test.duration);
}
is(!!test.keys, SpecialPowers.do_lookupGetter(e, "isEncrypted").apply(e),
msg + " isEncrypted should be true if we have decryption keys");
}
// Returns the first test from candidates array which we can play with the

Просмотреть файл

@ -56,6 +56,12 @@ function startTest(test, token)
v.addEventListener("playing", function () { gotPlaying = true; });
v.addEventListener("loadedmetadata", function() {
ok(SpecialPowers.do_lookupGetter(v, "isEncrypted").apply(v),
TimeStamp(token) + " isEncrypted should be true");
is(v.isEncrypted, undefined, "isEncrypted should not be accessible from content");
});
v.addEventListener("ended", function(ev) {
ok(true, TimeStamp(token) + " got ended event");