Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
fe6afa82
Commit
fe6afa82
authored
Jul 08, 2015
by
Timmy Willison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Effects: fix failing tests in IE8
parent
7ee0feac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
animation.js
test/unit/animation.js
+3
-2
tween.js
test/unit/tween.js
+4
-3
No files found.
test/unit/animation.js
View file @
fe6afa82
...
@@ -17,15 +17,16 @@ module( "animation", {
...
@@ -17,15 +17,16 @@ module( "animation", {
this
.
sandbox
=
sinon
.
sandbox
.
create
();
this
.
sandbox
=
sinon
.
sandbox
.
create
();
this
.
clock
=
this
.
sandbox
.
useFakeTimers
(
startTime
);
this
.
clock
=
this
.
sandbox
.
useFakeTimers
(
startTime
);
this
.
_oldInterval
=
jQuery
.
fx
.
interval
;
this
.
_oldInterval
=
jQuery
.
fx
.
interval
;
this
.
_oldNow
=
jQuery
.
now
;
jQuery
.
fx
.
step
=
{};
jQuery
.
fx
.
step
=
{};
jQuery
.
fx
.
interval
=
10
;
jQuery
.
fx
.
interval
=
10
;
jQuery
.
now
=
Date
.
now
;
jQuery
.
now
=
Date
.
now
||
this
.
_oldNow
;
jQuery
.
Animation
.
prefilters
=
[
defaultPrefilter
];
jQuery
.
Animation
.
prefilters
=
[
defaultPrefilter
];
jQuery
.
Animation
.
tweeners
=
{
"*"
:
[
defaultTweener
]
};
jQuery
.
Animation
.
tweeners
=
{
"*"
:
[
defaultTweener
]
};
},
},
teardown
:
function
()
{
teardown
:
function
()
{
this
.
sandbox
.
restore
();
this
.
sandbox
.
restore
();
jQuery
.
now
=
Date
.
n
ow
;
jQuery
.
now
=
this
.
_oldN
ow
;
jQuery
.
fx
.
stop
();
jQuery
.
fx
.
stop
();
jQuery
.
fx
.
interval
=
this
.
_oldInterval
;
jQuery
.
fx
.
interval
=
this
.
_oldInterval
;
window
.
requestAnimationFrame
=
oldRaf
;
window
.
requestAnimationFrame
=
oldRaf
;
...
...
test/unit/tween.js
View file @
fe6afa82
...
@@ -13,13 +13,14 @@ module( "tween", {
...
@@ -13,13 +13,14 @@ module( "tween", {
this
.
sandbox
=
sinon
.
sandbox
.
create
();
this
.
sandbox
=
sinon
.
sandbox
.
create
();
this
.
clock
=
this
.
sandbox
.
useFakeTimers
(
505877050
);
this
.
clock
=
this
.
sandbox
.
useFakeTimers
(
505877050
);
this
.
_oldInterval
=
jQuery
.
fx
.
interval
;
this
.
_oldInterval
=
jQuery
.
fx
.
interval
;
this
.
_oldNow
=
jQuery
.
now
;
jQuery
.
fx
.
step
=
{};
jQuery
.
fx
.
step
=
{};
jQuery
.
fx
.
interval
=
10
;
jQuery
.
fx
.
interval
=
10
;
jQuery
.
now
=
Date
.
now
;
jQuery
.
now
=
Date
.
now
||
this
.
_oldNow
;
},
},
teardown
:
function
()
{
teardown
:
function
()
{
this
.
sandbox
.
restore
();
this
.
sandbox
.
restore
();
jQuery
.
now
=
Date
.
n
ow
;
jQuery
.
now
=
this
.
_oldN
ow
;
jQuery
.
fx
.
stop
();
jQuery
.
fx
.
stop
();
jQuery
.
fx
.
interval
=
this
.
_oldInterval
;
jQuery
.
fx
.
interval
=
this
.
_oldInterval
;
window
.
requestAnimationFrame
=
oldRaf
;
window
.
requestAnimationFrame
=
oldRaf
;
...
@@ -198,7 +199,7 @@ test( "jQuery.Tween - Element", function() {
...
@@ -198,7 +199,7 @@ test( "jQuery.Tween - Element", function() {
ok
(
easingSpy
.
calledWith
(
0.1
,
0.1
*
testOptions
.
duration
,
0
,
1
,
testOptions
.
duration
),
ok
(
easingSpy
.
calledWith
(
0.1
,
0.1
*
testOptions
.
duration
,
0
,
1
,
testOptions
.
duration
),
"...using jQuery.easing.linear with back-compat arguments"
);
"...using jQuery.easing.linear with back-compat arguments"
);
equal
(
parseFloat
(
testElement
.
style
.
height
).
toFixed
(
2
),
eased
.
toFixed
(
2
),
"Set value"
);
equal
(
Math
.
floor
(
parseFloat
(
testElement
.
style
.
height
)
),
Math
.
floor
(
eased
),
"Set value"
);
tween
.
run
(
1
);
tween
.
run
(
1
);
equal
(
testElement
.
style
.
height
,
"0px"
,
"Checking another value"
);
equal
(
testElement
.
style
.
height
,
"0px"
,
"Checking another value"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment