mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 1424949 - Use assert_greater_than or assert_less_than in file_animations-dynamic-changes.html. r=birtles
MozReview-Commit-ID: I24yopOv51d --HG-- extra : rebase_source : cd57a9649a3ff1335112f1240e1fcfe694a053d5
This commit is contained in:
parent
97644c30a1
commit
c9071bce5c
@ -89,8 +89,8 @@ promise_test(function(t) {
|
||||
// TODO: Check that animations[0].startTime === null
|
||||
return animations[0].ready;
|
||||
}).then(function() {
|
||||
assert_true(animations[0].startTime > animations[1].startTime,
|
||||
'New Animation has later start time');
|
||||
assert_greater_than(animations[0].startTime, animations[1].startTime,
|
||||
'New Animation has later start time');
|
||||
});
|
||||
}, 'Only the startTimes of existing animations are preserved');
|
||||
|
||||
@ -109,8 +109,9 @@ promise_test(function(t) {
|
||||
'Remaining Animation is the second one in the list');
|
||||
assert_equals(typeof(animations[0].startTime), 'number',
|
||||
'Remaining Animation has resolved startTime');
|
||||
assert_true(animations[0].startTime < animations[0].timeline.currentTime,
|
||||
'Remaining Animation preserves startTime');
|
||||
assert_less_than(animations[0].startTime,
|
||||
animations[0].timeline.currentTime,
|
||||
'Remaining Animation preserves startTime');
|
||||
});
|
||||
}, 'Animations are removed from the start of the list while preserving'
|
||||
+ ' the state of existing Animations');
|
||||
@ -142,10 +143,11 @@ promise_test(function(t) {
|
||||
+ ' interleaving');
|
||||
return animations[1].ready;
|
||||
}).then(function() {
|
||||
assert_true(animations[1].startTime > animations[0].startTime,
|
||||
'Interleaved animation starts later than existing animations');
|
||||
assert_true(animations[0].startTime > animations[2].startTime,
|
||||
'Original animations retain their start time');
|
||||
assert_greater_than(animations[1].startTime, animations[0].startTime,
|
||||
'Interleaved animation starts later than existing ' +
|
||||
'animations');
|
||||
assert_greater_than(animations[0].startTime, animations[2].startTime,
|
||||
'Original animations retain their start time');
|
||||
});
|
||||
}, 'Animation state is preserved when interleaving animations in list');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user