From 587c09cb4859cbed5d19cfc161a7c0b6711da51a Mon Sep 17 00:00:00 2001 From: fat Date: Sun, 6 Jul 2014 21:50:46 -0700 Subject: [PATCH] fix scrollspy test in firefox mac os --- js/tests/unit/scrollspy.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js index 084e6fe6ee..b18d91189c 100644 --- a/js/tests/unit/scrollspy.js +++ b/js/tests/unit/scrollspy.js @@ -124,17 +124,17 @@ $(function () { test('should add the active class to the correct element', function () { var navbarHtml = - '' + '' var contentHtml = - '
' + - '
div 1
' + - '
div 2
' + - '
' + '
' + + '
div 1
' + + '
div 2
' + + '
' $(navbarHtml).appendTo('#qunit-fixture') var $content = $(contentHtml) @@ -143,7 +143,7 @@ $(function () { var testElementIsActiveAfterScroll = function (element, target) { var deferred = $.Deferred() - var scrollHeight = $content.scrollTop() + $(target).position().top + var scrollHeight = Math.ceil($content.scrollTop() + $(target).position().top) stop() $content.one('scroll', function () { ok($(element).hasClass('active'), 'target:' + target + ', element' + element)