As per PR comments from reviewer, fixing coding style.

This commit is contained in:
Valera Rozuvan
2013-06-14 10:53:26 +03:00
committed by Vasyl Nakvasiuk
parent cfb9a54e21
commit b75876e3ac

View File

@@ -269,9 +269,11 @@ describe 'VideoCaptionAlpha', ->
expect(parseInt($('.subtitles').css('maxHeight'))).toBeCloseTo $('.video-wrapper').height(), 2
it 'set the height of caption spacing', ->
expect(Math.abs(parseInt($('.subtitles .spacing:first').css('height')) - @caption.topSpacingHeight())).toBeLessThan 1
expect(Math.abs(parseInt($('.subtitles .spacing:last').css('height')) - @caption.bottomSpacingHeight())).toBeLessThan 1
firstSpacing = Math.abs(parseInt($('.subtitles .spacing:first').css('height')))
lastSpacing = Math.abs(parseInt($('.subtitles .spacing:last').css('height')))
expect(firstSpacing - @caption.topSpacingHeight()).toBeLessThan 1
expect(lastSpacing - @caption.bottomSpacingHeight()).toBeLessThan 1
it 'scroll caption to new position', ->
expect($.fn.scrollTo).toHaveBeenCalled()
@@ -308,8 +310,10 @@ describe 'VideoCaptionAlpha', ->
@caption.scrollCaption()
it 'scroll to current caption', ->
offset = -0.5 * ($('.video-wrapper').height() - $('.subtitles .current:first').height())
expect($.fn.scrollTo).toHaveBeenCalledWith $('.subtitles .current:first', @caption.el),
offset: - ($('.video-wrapper').height() / 2 - $('.subtitles .current:first').height() / 2)
offset: offset
describe 'seekPlayer', ->