зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1124491 - Test HTMLMediaElement.isEncrypted attribute - r=cpearce
This commit is contained in:
Родитель
e49b1630b3
Коммит
fabd1cd79e
|
@ -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");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче