1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-27 11:22:06 +02:00

Also, switch out HTMLVideoElement to constructor reference in tests

This commit is contained in:
Gary Katsevman 2014-03-24 19:07:19 -04:00
parent f86e073f03
commit 817253b74f

View File

@ -44,7 +44,7 @@ test('should re-link the player if the tech is moved', function(){
test('patchCanPlayType patches canplaytype with our function, conditionally', function() { test('patchCanPlayType patches canplaytype with our function, conditionally', function() {
var oldAV = vjs.ANDROID_VERSION, var oldAV = vjs.ANDROID_VERSION,
video = document.createElement('video'), video = document.createElement('video'),
canPlayType = HTMLVideoElement.prototype.canPlayType, canPlayType = vjs.TEST_VID.constructor.prototype.canPlayType,
patchCanPlayType, patchCanPlayType,
unpatchedCanPlayType; unpatchedCanPlayType;
@ -56,7 +56,7 @@ test('patchCanPlayType patches canplaytype with our function, conditionally', fu
patchCanPlayType = video.canPlayType; patchCanPlayType = video.canPlayType;
unpatchedCanPlayType = vjs.Html5.unpatchCanPlayType(); unpatchedCanPlayType = vjs.Html5.unpatchCanPlayType();
strictEqual(video.canPlayType, HTMLVideoElement.prototype.canPlayType, 'original canPlayType and unpatched canPlayType should be equal'); strictEqual(video.canPlayType, vjs.TEST_VID.constructor.prototype.canPlayType, 'original canPlayType and unpatched canPlayType should be equal');
vjs.ANDROID_VERSION = oldAV; vjs.ANDROID_VERSION = oldAV;
}); });