From a5a6d2d54afdc81319d88e19fb8f4291229da392 Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Fri, 16 Aug 2013 16:59:40 +0300 Subject: [PATCH] Added test for Flash video player. Fix for video and captions sync. Test for this fix. --- .../xmodule/js/spec/video/video_caption_spec.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js index 49e5df0e9a..f7a7e131dc 100644 --- a/common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js +++ b/common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js @@ -443,7 +443,7 @@ }); it('trigger seek event with the correct time', function() { - expect(videoPlayer.currentTime).toEqual(15); + expect(videoPlayer.currentTime).toEqual(14.91); }); }); @@ -455,7 +455,20 @@ }); it('trigger seek event with the correct time', function() { - expect(videoPlayer.currentTime).toEqual(15); + expect(videoPlayer.currentTime).toEqual(14.91); + }); + }); + + describe('when the player type is Flash at speed 0.75x', function () { + beforeEach(function () { + initialize(); + videoSpeedControl.currentSpeed = '0.75'; + state.currentPlayerMode = 'flash'; + $('.subtitles li[data-start="14910"]').trigger('click'); + }); + + it('trigger seek event with the correct time', function () { + expect(videoPlayer.currentTime).toEqual(15); }); }); });