Commit d408d7ad by Valera Rozuvan

Enabled 2nd disabled Jasmine test.

parent deb36999
...@@ -206,20 +206,29 @@ ...@@ -206,20 +206,29 @@
state3 = new Video('#example3'); state3 = new Video('#example3');
}); });
xit('check for YT availability is performed only once', function () { it('check for YT availability is performed only once', function () {
var numAjaxCalls = 0; var numAjaxCalls = 0;
// Total ajax calls made. // Total ajax calls made.
numAjaxCalls = $.ajax.calls.length; numAjaxCalls = $.ajax.calls.length;
// Subtract ajax calls to get captions. // Subtract ajax calls to get captions via
// state.videoCaption.fetchCaption() function.
numAjaxCalls -= $.ajaxWithPrefix.calls.length; numAjaxCalls -= $.ajaxWithPrefix.calls.length;
// Subtract ajax calls to get metadata for each video. // Subtract ajax calls to get metadata for each video via
// state.getVideoMetadata() function.
numAjaxCalls -= 3;
// Subtract ajax calls to log event 'pause_video' via
// state.videoPlayer.log() function.
numAjaxCalls -= 3; numAjaxCalls -= 3;
// This should leave just one call. It was made to check // This should leave just one call. It was made to check
// for YT availability. // for YT availability. This is done in state.initialize()
// function. SPecifically, with the statement
//
// this.youtubeXhr = this.getVideoMetadata();
expect(numAjaxCalls).toBe(1); expect(numAjaxCalls).toBe(1);
}); });
}); });
......
...@@ -420,7 +420,7 @@ function (HTML5Video) { ...@@ -420,7 +420,7 @@ function (HTML5Video) {
this.videoPlayer.player.setPlaybackRate(this.speed); this.videoPlayer.player.setPlaybackRate(this.speed);
} }
/* The following has been commented out to make sure autoplay is /* The following has been commented out to make sure autoplay is
disabled for students. disabled for students.
if ( if (
!onTouchBasedDevice() && !onTouchBasedDevice() &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment